[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3bc7bb7-acc5-4087-af3c-120b82bd7b51@redhat.com>
Date: Tue, 1 Jul 2025 15:20:14 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jeremy Kerr <jk@...econstruct.com.au>,
Matt Johnston <matt@...econstruct.com.au>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next v4 12/14] net: mctp: allow NL parsing directly
into a struct mctp_route
On 6/27/25 10:52 AM, Jeremy Kerr wrote:
> @@ -1318,61 +1333,114 @@ static int mctp_route_nlparse(struct net *net, struct nlmsghdr *nlh,
> return -EINVAL;
> }
>
> + if ((*rtm)->rtm_type != RTN_UNICAST) {
> + NL_SET_ERR_MSG(extack, "rtm_type must be RTN_UNICAST");
> + return -EINVAL;
> + }
> +
> dev = __dev_get_by_index(net, ifindex);
> if (!dev) {
> NL_SET_ERR_MSG(extack, "bad ifindex");
> return -ENODEV;
> }
> +
> *mdev = mctp_dev_get_rtnl(dev);
> if (!*mdev)
> return -ENODEV;
>
> - if (dev->flags & IFF_LOOPBACK) {
> - NL_SET_ERR_MSG(extack, "no routes to loopback");
> - return -EINVAL;
> - }
It looks like the above test is not performed anymore. Is that
intentional? Even in that case, a comment in the commit message would be
useful for future memory.
/P
Powered by blists - more mailing lists