Article View: linux.kernel.netdev
Article #24362Re: [PATCH net-next v4 05/12] amt: forward multicast data over IPv6
From: netdev-bot+sashiko
Date: Mon, 30 Nov 2026 03:48
Date: Mon, 30 Nov 2026 03:48
113 lines
12093 bytes
12093 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In amt_dev_xmit() (drivers/net/amt.c), the patch saves the
transport header before calling ipv6_mc_check_mld() and restores it…
--
amt: forward multicast data over IPv6
This commit makes the AMT relay send Multicast Data through
amt_udp_xmit(), so the data path works over IPv6 as well as IPv4. Over
IPv6 it routes first, drops payloads that do not fit the route MTU minus
the outer and AMT headers, and sends a single Packet Too Big to an IPv6
source. It also puts back the transport header that ipv6_mc_check_mld()
moved, so the per-segment GSO length check counts extension headers.
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 8da1e73b1655e..bcd88203eeab9 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
[ ... ]
> @@ -1524,6 +1573,9 @@ static netdev_tx_t amt_dev_xmit(struct sk_buff *skb, struct net_device *dev)
> group.ip4 = ip_hdr(skb)->daddr;
> #if IS_ENABLED(CONFIG_IPV6)
> } else if (iph->version == 6) {
> + bool th_set = skb_transport_header_was_set(skb);
> + int th_off = th_set ? skb_transport_offset(skb) : 0;
> +
> ip6h = ipv6_hdr(skb);
> if (!ipv6_addr_is_multicast(&ip6h->daddr))
> goto free;
> @@ -1540,6 +1592,14 @@ static netdev_tx_t amt_dev_xmit(struct sk_buff *skb, struct net_device *dev)
> }
> } else {
> data = true;
> + /* ipv6_mc_check_mld() set the transport header
> + * just past the fixed IPv6 header, even when
> + * extension headers follow, which would make the
> + * segments of a GSO skb look shorter than they
> + * are. Put it back.
> + */
> + if (th_set)
> + skb_set_transport_header(skb, th_off);
[Severity: Medium]
Does the saved th_off actually account for extension headers on the
relay's usual input path, IPv6 multicast forwarded by ip6mr?
For received packets, ip6_rcv_core() in net/ipv6/ip6_input.c sets:
skb->transport_header = skb->network_header + sizeof(*hdr);
Only ipv6_parse_hopopts() moves it after that, and only past a
Hop-by-Hop header. Nothing on the ip6mr forwarding path moves it past a
Destination Options or Routing header.
ipv6_mc_check_exthdrs() also returns -ENOMSG right away when nexthdr is
not HOPOPTS. So for a forwarded packet with a Destination Options header,
th_off is still network + 40. Restoring it leaves the transport header at
the start of the extension header, which is the offset the comment says
it is undoing.
The skb then reaches amt_tmtu_exceeded():
amt_dev_xmit()
amt_send_multicast_data()
amt_tmtu_exceeded()
skb_gso_validate_network_len(oskb, tmtu)
For a UDP_L4 GSO skb, the segment length is computed as
(transport - network) + sizeof(struct udphdr) + gso_size. Can this
under-count each segment by the length of the extension headers, so that
segments up to that many bytes over the tunnel MTU pass the RFC 7450
s5.3.3.6.2.2 drop check, and the source never gets a Packet Too Big?
One way to hit this is an ingress device with rx-udp-gro-forwarding
enabled. ipv6_gro_receive() pulls the Destination Options header through
ipv6_gro_pull_exthdrs() and builds a UDP_L4 GSO skb, which ip6mr then
forwards to the amt device.
The same offset is then copied into inner_transport_header by
skb_reset_inner_headers() in amt_send_multicast_data():
> skb_reset_mac_header(skb);
> skb_reset_inner_headers(skb);
Would the outer skb_gso_validate_network_len() in ip6_finish_output_gso()
under-count the same way, letting outer segments larger than dst_mtu()
leave the relay unfragmented, only to be dropped by the link or a hop
further on?
This code is unchanged at the end of the series.
> }
> v6 = true;
> group.ip6 = ipv6_hdr(skb)->daddr;
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129034652.1853485-1-omar%40blockcast.net
Technical Details
Message-ID:
<179601051244.3146.8134195674516208005@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373831-linux-kernel-netdev=dewy.ruReferences:
<20261129034652.1853485-6-omar@blockcast.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373831-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 05/12] amt: forward multicast data over IPv6 Date: Mon, 30 Nov 2026 03:48:32 +0000 Organization: Usenet Network Message-ID: <179601051244.3146.8134195674516208005@kernel.org> References: <20261129034652.1853485-6-omar@blockcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1325223"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:WxKtS+5e9J3aw/7M0wFxkSa23sQ= sha256:KJ4PsoTXoxF1ZEZ20J2m4nIDIO8NllarWtOJRM0GXuo= sha1:4X1yRiItjFEBjrMOVS5LG3If+Cs= sha256:P1NhUp9WaDjbKF2fgg9LFDooK7jTwZbDwm9ffQ941cQ= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 3FCC8125D6D; Mon, 30 Nov 2026 06:49:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qBE5pXN20BQp; Mon, 30 Nov 2026 06:49:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373831-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 9B247125FBC; Mon, 30 Nov 2026 06:49:03 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id E6BC528293; Mon, 30 Nov 2026 03:48:38 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796010517; b=NdJs1emK8LUnc45NI6YheEB0MkXn6nj9dMH8Fl4WK7gyHojyK7wNfhzEm9gvK4RB8QMJ gmSF/kPrxbN9Fl3EbuIOIJm2jcOzKY+ZibwFLQHJiVItcqR/AU4ZbmWMS7j/dAgVLZcjX erjmhxAtLtePG5K3g+bzNxtEuYa6CmZI9oo8+ENXQMYHoFzKfEy16EpTia8YjP5NH0Kdr diMl8cYfFaeYKS8eOMkRFLWMJgJDmVssMNRafMsZ6q1/hVc1vKCcIB/1pTsQMJueYUgp3 f5o5AnkF36vQERJpuF5T9MzYUe8mLoPrV8YIc7wh/oa7nZlY+qZOH1Ixe/ExpFyntBw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796010517; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=Fj6naVsnWNmPxzjyM1AevjW7k5buVhoSyMyMIxKYoss=; b=bS1xGUyn0eBSb0CEZ3RBEBt+bIuLxGNkilpRz5xZ7VL0M5kJpoPL6gWUVwi5Qnefvs2u e6ob0vVNBGEniqmTA2UzNNLyv5/tNmUnVMUyDmA5NLvzRanWPOb3zAbqCpm4m7NFQye9M aMNZVFQRuUjWDc16ocFQIOzCNR/i1cF+QkBIl6cx7evGHRe+owne/B7hGqLY8NhnIig+c 7QpcLNSMOT7NQHWNRv4RFzwhWS9SqWC0lSDpr6/zecIgYvc4YuYROdmWmQXdmYcKWTlZ8 ij7c1fSw+0/r8qwT2ExnMnHM9hMAZ/TOdzX74vXoY+5Q/axms4vF25IYIJvYst9BcLA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TDm57zYi; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6552D606A698; Mon, 30 Nov 2026 03:48:37 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TDm57zYi X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796010514; b=1ks4sfwN+qhfqJttO2x2SzstuZPUBnTtNZuWWGAOYn4HkZmLKSACo+UPdE+M4OyWxT7S fi2rG3lUYe60aoTZqLzHy1lVfDO4HPm5lmOOW0KHOgb22DCZYEYGf//eO84BFRoMu/qVY 0MeEjU9v6T1FgT3dAEOtX8yT3l+A0kgd8Ev9Ryimj/Di7fuNuldB/s9/WbA0Tz5/xjfLh J/wZXeh04qUg8U/ApzHCBJlG7MlN78V+oZt+I3pQX9Oqxr+AT4lzLKXv16HkIqZbNspPi jWfKpy+PIpAcXypyH/2IgJT0WGTYVE4pfaXwoD1/lblc1Uc6T7j2JLENF9kOBw2X1Hw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796010514; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Fj6naVsnWNmPxzjyM1AevjW7k5buVhoSyMyMIxKYoss=; b=JzgHt6KlLPsIeqznLSJOmmWjVP8rVgQsxn/n6p7ihdHbpH0dFyRy23kqJrGvoo0Pbisg BItW4XEvhWYSDbW9VqaML5A3kitOzs1S8uw2fCB31dVBZuoKwG+zPa8SPTWw/KwkvdRh7 qgoE9iSLqwQSe+uJk1swKgIxHW9L6ZZ0EfW8kH1YQGe27LAqyHkDkyDqY+UI8eiTLH8s7 k9U/Oktkp6rR38ff2bt8I1csSPCdcFiPYwWmDmgjaqLBsZx++RVpoWo39FoI+86ZDWJVN Cu6HTUYLfClr7IDCcHFdloAZZZUE/c+mu/POwt9jVdl9YGUP6cZa32vHwF2NCijaDQw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TDm57zYi; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D9EE606A33B; Mon, 30 Nov 2026 03:48:33 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDAE11F00896; Mon, 30 Nov 2026 03:48:32 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796010513; bh=Fj6naVsnWNmPxzjyM1AevjW7k5buVhoSyMyMIxKYoss=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=TDm57zYiJCojjRNqq5+ndyaF9tj4VKYEBNyulykdv1eZE+jh3yKcHZfdgf0Ww5q/D 3XfX51IV2hmNUU2b0DT5NN/V7QzkPMGp2qJcpsDaBKDkXFpBWtg+vMBjkMwRAXvO61 qt81frZyiS52WtJI9WXe4M9BZGVUvfiCE5G/HfKGb/Lx2/uf6oN9Ydaae4i5/JpI+x 2G05SY3oi332mkqKPeQ/qELN72Yg7+I8CM1rY9ctRcVgyfc7qxm4jH8KavsL1AcngJ 0t8XsekFbnr92mzrgJHZ/C+bAymb7QuYOeqFoRLefyekEGiUs2OiPMn1rQIUPADWDk cAZAMm9DJbEbQ== X-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 X-In-Reply-To: <20261129034652.1853485-6-omar@blockcast.net> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list