Re: [PATCH net-next v3 04/12] amt: send the Membership Query over IPv6
From: netdev-bot+sashiko
Date: Sat Nov 28 2026 - 04:48:52 EST
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] The commit message of "amt: send the Membership Query over IPv6"
describes several things this patch does not do.
- [Low] The comment above amt_send_igmp_gq() in drivers/net/amt.c still
says "The destination is passed by value rather than as a tunnel".
--
amt: send the Membership Query over IPv6
This moves the routing and transmit step of amt_send_membership_query()
into a new amt_udp_xmit() helper. The helper sends over IPv4 or IPv6
depending on the device's outer family. amt_send_igmp_gq() and
amt_send_mld_gq() now take the gateway endpoint as a const union amt_addr
pointer.
> udp_tunnel_xmit_skb() scrubs the skb in iptunnel_xmit(),
> but udp_tunnel6_xmit_skb() does not, so the IPv6 path calls
> skb_scrub_packet() itself. Otherwise the conntrack entry and extensions
> of the inner packet would stay on the outer one, which conntrack would
> then pass as an already tracked flow.
[ ... ]
> The v6 argument keeps its meaning: it selects the inner protocol, IGMP
> or MLD, which is independent of the outer family, so an IPv6 relay
> queries for both. The relay's General Query, which amt_send_igmp_gq()
> and amt_send_mld_gq() now send directly through
> amt_send_membership_query(), takes the IPv6 path.
[Severity: Low]
A few parts of this commit message don't seem to match what the patch
does.
Is "now send directly" accurate? Before this patch, amt_send_igmp_gq()
and amt_send_mld_gq() already called amt_send_membership_query()
directly:
if (amt_send_membership_query(amt, skb, daddr, dport, nonce, mac,
false)) {
The only change to them here is the type of daddr, from __be32 to
const union amt_addr *.
On skb_scrub_packet() in amt_udp_xmit(): its only caller in this patch
is amt_send_membership_query(). That skb is a query built locally by
amt_build_igmp_gq() or amt_build_mld_gq(), and it has not passed a
netfilter hook. Is there any inner conntrack to scrub yet? The scrub
looks like it only matters for later callers of the helper in the
series (multicast data and the Membership Update), and the message
doesn't mention them.
Also, nothing sets amt->local_ipv6 at this commit. There is no
assignment and no IFLA_AMT_LOCAL_IP6 handling in drivers/net/amt.c, so
amt_v6() is always false and the IPv6 branch of amt_udp_xmit() can't
run yet. The only change that takes effect is that the IPv4 route
lookup now runs after the AMT header push.
Earlier patches in the series say that amt_v6() is still false for
every device, so there is no functional change. Could this one say the
same? The subject suggests IPv6 queries work as of this commit, which
could mislead someone bisecting.
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 83e666a023c12..70be70ed5ce03 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
[ ... ]
> @@ -1022,8 +1029,8 @@ static bool amt_send_membership_query(struct amt_dev *amt,
> * unauthenticated, so no tunnel state is created or changed for it - see
> * amt_request_handler().
> */
> -static void amt_send_igmp_gq(struct amt_dev *amt, __be32 daddr, __be16 dport,
> - __be32 nonce, u64 mac)
> +static void amt_send_igmp_gq(struct amt_dev *amt, const union amt_addr *daddr,
> + __be16 dport, __be32 nonce, u64 mac)
> {
> struct sk_buff *skb;
>
[Severity: Low]
The first line of the comment above amt_send_igmp_gq(), just outside
this hunk, still reads:
/* The destination is passed by value rather than as a tunnel: a Request is
Should this be updated? daddr is now a pointer to the caller's on-stack
saddr in amt_request_handler().
This same patch rewrites the matching comment above
amt_send_membership_query() to say "the nonce and the MAC by value, the
endpoint as a pointer to the caller's copy", so the two comments now
disagree. The stale wording is still there at the end of the series.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127094703.3025517-1-omar%40blockcast.net