netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>,
	Matt Johnston <matt@codeconstruct.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4 12/14] net: mctp: allow NL parsing directly into a struct mctp_route
Date: Tue, 1 Jul 2025 15:20:14 +0200	[thread overview]
Message-ID: <f3bc7bb7-acc5-4087-af3c-120b82bd7b51@redhat.com> (raw)
In-Reply-To: <20250627-dev-forwarding-v4-12-72bb3cabc97c@codeconstruct.com.au>

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


  reply	other threads:[~2025-07-01 13:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-27  8:52 [PATCH net-next v4 00/14] net: mctp: Add support for gateway routing Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 01/14] net: mctp: don't use source cb data when forwarding, ensure pkt_type is set Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 02/14] net: mctp: test: make cloned_frag buffers more appropriately-sized Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 03/14] net: mctp: separate routing database from routing operations Jeremy Kerr
2025-07-01 13:14   ` Paolo Abeni
2025-07-02  5:26     ` Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 04/14] net: mctp: separate cb from direct-addressing routing Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 05/14] net: mctp: test: Add an addressed device constructor Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 06/14] net: mctp: test: Add extaddr routing output test Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 07/14] net: mctp: test: move functions into utils.[ch] Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 08/14] net: mctp: test: add sock test infrastructure Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 09/14] net: mctp: test: Add initial socket tests Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 10/14] net: mctp: pass net into route creation Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 11/14] net: mctp: remove routes by netid, not by device Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 12/14] net: mctp: allow NL parsing directly into a struct mctp_route Jeremy Kerr
2025-07-01 13:20   ` Paolo Abeni [this message]
2025-07-02  5:28     ` Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 13/14] net: mctp: add gateway routing support Jeremy Kerr
2025-06-27  8:52 ` [PATCH net-next v4 14/14] net: mctp: test: Add tests for gateway routes Jeremy Kerr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3bc7bb7-acc5-4087-af3c-120b82bd7b51@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).