mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: omar@blockcast.net
Cc: ap420073@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	shuah@kernel.org, horms@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	willemb@google.com, dsahern@kernel.org, idosch@nvidia.com
Subject: Re: [PATCH net-next v6 08/12] amt: receive the AMT gateway control plane over IPv6
Date: Thu, 03 Dec 2026 04:33:21 +0000	[thread overview]
Message-ID: <179627240157.3146.10044161677966001613@kernel.org> (raw)
In-Reply-To: <20261202043200.286260-9-omar@blockcast.net>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This patch changes the transmit path in a way the commit message
  never mentions.

--

amt: receive the AMT gateway control plane over IPv6

This patch lets amt_rcv() and amt_advertisement_handler() handle the
replies a gateway gets over an IPv6 outer transport. The learned
remote_ipv6 is now published under a new seqlock, and a relay drops
packets whose IPv6 source is one of the host's own addresses. The UDP
zero-checksum policy for an IPv6 gateway is also adjusted.

> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 40481b0f9d5ef..c2126c7ba625a 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
> @@ -767,6 +767,10 @@ static struct dst_entry *amt_route6(struct amt_dev *amt, struct sock *sk,
>  {
>  	struct flowi6 fl6;
>
> +	/* A gateway that just forgot its relay publishes ::. */
> +	if (ipv6_addr_any(daddr))
> +		return ERR_PTR(-EINVAL);
> +

[Severity: Low]
This isn't a bug, but should the commit message mention this transmit
side change?

amt_route6() is shared by every IPv6 sender: amt_send_ctrl_v6(),
amt_udp_xmit() and amt_send_multicast_data(). With this check, each of
them now gets -EINVAL instead of a route lookup when the destination
is ::. amt_send_ctrl_v6() also counts it in tx_errors:

	dst = amt_route6(amt, sk, saddr, daddr, sport, dport);
	if (IS_ERR(dst)) {
		DEV_STATS_INC(amt->dev, tx_errors);
		err = PTR_ERR(dst);

The check follows from this patch's own amt_clear_remote(), which writes
in6addr_any into remote_ipv6. amt_send_request_v6() and
amt_send_membership_update() then read that value back through
amt_get_remote_ipv6().

The commit message describes the other hunks in detail, and the subject
says the patch is about receiving. It never says that sends to :: are
now refused or that they show up in tx_errors.

Could this be described in the commit message? Alternatively, it could
go into the earlier "amt: send the AMT gateway control plane over IPv6"
patch, which added the IPv6 senders.

>  	memset(&fl6, 0, sizeof(fl6));
>  	fl6.flowi6_oif		= amt->stream_dev->ifindex;
>  	fl6.flowi6_proto	= IPPROTO_UDP;

[ ... ]

> +static void amt_clear_remote(struct amt_dev *amt)
> +{
> +	WRITE_ONCE(amt->remote_ip, 0);
> +	amt_set_remote_ipv6(amt, &in6addr_any);
> +}

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202043200.286260-1-omar%40blockcast.net

  reply	other threads:[~2026-12-03  4:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  4:31 [PATCH net-next v6 00/12] amt: add an IPv6 outer transport Omar Ramadan
2026-12-02  4:31 ` [PATCH net-next v6 01/12] amt: create an AF_INET6 encapsulation socket for an IPv6 outer address Omar Ramadan
2026-12-02  4:31 ` [PATCH net-next v6 02/12] amt: send the Relay Advertisement over IPv6 Omar Ramadan
2026-12-02  4:31 ` [PATCH net-next v6 03/12] amt: key relay tunnels on a union amt_addr endpoint Omar Ramadan
2026-12-03  4:33   ` netdev-bot+sashiko
2026-12-02  4:31 ` [PATCH net-next v6 04/12] amt: send the Membership Query over IPv6 Omar Ramadan
2026-12-03  4:33   ` netdev-bot+sashiko
2026-12-02  4:31 ` [PATCH net-next v6 05/12] amt: forward multicast data " Omar Ramadan
2026-12-03  4:33   ` netdev-bot+sashiko
2026-12-02  4:31 ` [PATCH net-next v6 06/12] amt: size the encapsulation headroom by the outer IP version Omar Ramadan
2026-12-02  4:31 ` [PATCH net-next v6 07/12] amt: send the AMT gateway control plane over IPv6 Omar Ramadan
2026-12-03  4:33   ` netdev-bot+sashiko
2026-12-02  4:31 ` [PATCH net-next v6 08/12] amt: receive " Omar Ramadan
2026-12-03  4:33   ` netdev-bot+sashiko [this message]
2026-12-02  4:31 ` [PATCH net-next v6 09/12] amt: add netlink attributes for an IPv6 outer transport Omar Ramadan
2026-12-02  4:31 ` [PATCH net-next v6 10/12] MAINTAINERS: amt: cover the amt headers and selftests Omar Ramadan
2026-12-02  4:31 ` [PATCH net-next v6 11/12] selftests: net: add amt_v6.sh for an IPv6 outer transport Omar Ramadan
2026-12-03  4:33   ` netdev-bot+sashiko
2026-12-02  4:32 ` [PATCH net-next v6 12/12] selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes Omar Ramadan

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=179627240157.3146.10044161677966001613@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=omar@blockcast.net \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.com \
    /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

all inboxes | Powered by JetHome®