Article View: linux.kernel.netdev
Article #16143Re: [PATCH net-next 12/15] netfilter: flowtable: tunnel device poisons h_source of fast-path frames
From: netdev-bot+sashiko
Date: Sat, 14 Nov 2026 03:23
Date: Sat, 14 Nov 2026 03:23
92 lines
11317 bytes
11317 bytes
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's only reproduction cannot happen on the tree
this patch targets.
--
netfilter: flowtable: tunnel device poisons h_source of fast-path frames
This commit stops nft_dev_path_info() from copying the dev_addr of a
DEV_PATH_TUN device into info->h_source. On a tunnel device, dev_addr is
the local tunnel IP address and not an Ethernet address. Before this
change, those bytes became the source MAC of fast-path frames.
> Seen on a DS-Lite setup, LAN -> ip6tnl (IPv4 inside IPv6) -> PPPoE ->
> 802.1Q VLAN -> Ethernet, with conntrack flows offloaded through an
> nftables flowtable ('flow add @ft'). The first packets of a flow, still
> on the slow path, and the fast-path packets of the same flow differ only
> in the Ethernet source address:
>
> slow path: d8:58:d7:00:2e:bd > 80:ac:ac:39:ef:c2, 802.1Q vlan 35,
> PPPoE [ses 0x454] IP6 2a01:110f:4328:c400::1 >
> 2a01:1000:0:1::2216 next-header IPIP, 192.0.0.2.40010 >
> 1.1.1.1.53
> fast path: 2a:01:11:0f:43:28 > 80:ac:ac:39:ef:c2, same frame otherwise
[Severity: Low]
Can this DS-Lite setup reach the flowtable fast path on this tree?
ip6_tnl_fill_forward_path() starts by rejecting any inner flow that is not
IPv6:
net/ipv6/ip6_tunnel.c:ip6_tnl_fill_forward_path() {
...
if (ctx->ether_type != cpu_to_be16(ETH_P_IPV6))
return -EOPNOTSUPP;
...
path->tun.inner_proto = IPPROTO_IPV6;
...
}
For a forwarded IPv4 flow, ctx->ether_type comes from pkt->ethertype.
nft_set_pktinfo() sets that to skb->protocol, which is ETH_P_IP here:
include/net/netfilter/nf_tables.h:nft_set_pktinfo() {
...
pkt->ethertype = pkt->skb->protocol;
...
}
So dev_fill_forward_path() fails and nft_flow_route() returns -ENOENT. No
flow entry is created, and nft_dev_path_info() never sees a DEV_PATH_TUN
entry for this topology.
inner_proto is also hard-coded to IPPROTO_IPV6. Given that, could the
offload path on this tree produce the "next-header IPIP" fast-path frame
quoted above?
The check came from commit 5592223f3d4e45 ("net: netfilter: add
ether_type to net_device_path_ctx and use it"). That commit says IPv4
over IPv6 is "currently not support[ed]". Was the capture taken on an
older kernel, or on one with local changes?
> The PPPoE endpoint binds the session to the
> subscriber MAC and silently drops the frames, the effect is that every
> TCP/UDP flow dies the moment it is offloaded, while ICMP, which is never
> offloaded, keeps working.
The code change itself looks correct. On this tree, the h_source
poisoning still seems reachable in two ways:
- ipip_fill_forward_path(), which accepts ETH_P_IP inner flows and
emits DEV_PATH_TUN with dev_addr set to the local IPv4 address
- ip6tnl carrying an IPv6 inner flow
Either one needs a PPPoE entry later on the path, or a hw-offload
flowtable on an Ethernet device. Then xmit_type is
FLOW_OFFLOAD_XMIT_DIRECT, and info.h_source is copied into
route->tuple[dir].out.h_source.
Could the commit message describe one of those reproducible cases
instead? Alternatively, it could note that the DS-Lite observation came
from a kernel without commit 5592223f3d4e45.
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113031251.2437074-2-pablo%40netfilter.org
Technical Details
Message-ID:
<179462663016.2199510.13278925196473487911@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363075-linux-kernel-netdev=dewy.ruReferences:
<20261113031251.2437074-13-pablo@netfilter.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363075-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 12/15] netfilter: flowtable: tunnel device poisons h_source of fast-path frames Date: Sat, 14 Nov 2026 03:23:50 +0000 Organization: Usenet Network Message-ID: <179462663016.2199510.13278925196473487911@kernel.org> References: <20261113031251.2437074-13-pablo@netfilter.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1499857"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Wcrd1yixJdfx+fGiZqWzrJEnnmw= sha256:xv8FNf9gw4+n0JpVh0RTmsl4hzJoWipDEmNWFlxT66w= sha1:c6/XjFTOef0M4r2awZw6cx5TH0M= sha256:BA+bnc/dyQ9TFrBcvZjXrNVHgQV9tPoXy3Ma3XgLZj8= 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 8A24811467B; Sat, 14 Nov 2026 06:24:46 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 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, URIBL_BLOCKED=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 4eL9nLduAdfm; Sat, 14 Nov 2026 06:24:42 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363075-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 9E8F211474C; Sat, 14 Nov 2026 06:24:33 +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 C13C86422C; Sat, 14 Nov 2026 03:24:20 +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=1794626632; b=w/EBkhY3Ipl4z24QXWBG+2NE6QLk5MJL1gxvYtUfC1M9IPBQ/jHOoIMP9mMYgcoMmVVH nstM/KFMHeoCYZ5mIqjEg6mG5s5oN2tJgGSmxo77FONqa8BxJ7ZBcTA56h6BoU4v+xqPq zd2XYCpxDkvtbYtDGcFvsH3KbxMevhjOCa+knsUSXJ7/bCVsDvGFS10Qqw40bb4KRSaTW VPL8CAX7ccGWR1AP54BNxr4uj/Fqs3S19aYrYpdahiU0psVCRZ+l4jPGoo7ftGvhB5C0+ 2qFg469MFxC5QCzURqvSgTXiYDTEr08A+NBS5vR00snS2rSk9emlwU+aZvre6JBVnWQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794626632; 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=vOrw1y8m+9NBltBknIKtJtVKStAg1SQPVgtsudklyYI=; b=RFFO9Fwcl+HGpY9BzQ8wP6I/NKTNqdSWgFUNjETz7KqJfSgTRvSIcRtdTjwXc6edS4+R N5w67OXr8wrZHPO06ovEUhMDqInw2vhPPGyYHdkqruUsSiOPeGjY879gHxM8G/nZ/jnX2 MAQfUBu9M5ScXiRWZfVntWtn5xDrVHb/NDjY7WzfFz8dttbBqrtDIYPC/6QSmcpJpE0Ar rbMgjNVty/e3gnpEs412iRFpw8ACSQcn8FRzN2WtKfuyc4wZbBXorJK7VPOCY5+DCgbJw IsB7wGbA3P8FwJLoHOCdmUKKrbER2j2RDbWKIEpp5lf0GUfIwWV1SFV6gR3Hn5r5uwg== 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="GwWGXRx/"; 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 2E2C4606A32E; Sat, 14 Nov 2026 03:23:52 +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=GwWGXRx/ 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=1794626631; b=N1aOOCV2rg4s64E0UJ58sTERclgKOn4XL3Rnzihle2CMGI9ROIxntc2VgPYkSXaalX4J U78YITyLcTALuO9G5+hoV7OTHQ1YLwa/orucF5xJxd78BjBHDiMSHKawWEQdRXoYkvr4V vCYD+O9SGB6cf1AgUHH+gurd+m+H79yRISBqrNLCPO96KnT8KDSwfoVAC4JCehMgoxMbC X93LCSxiDMnvxhRrApSAncrcbuD3YFv/gld3n7DzVzIoyOwtI9cx3GWgDl57/ZBAU/A0b kPH9cvU0zR5hpAv+eTwLcCgptgGrEj5UyA1GDtjMzeAgoX3EWx51WgtZ4lhFtEKFctg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794626631; 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=vOrw1y8m+9NBltBknIKtJtVKStAg1SQPVgtsudklyYI=; b=U764lOoac6ork7oEvi6Hs5cbb21kL7zRmFXRZA7Pvo5SEO+mA0N6gJx2cxp4nvmuTaCE YLQ+8wBe1HlY2JPgkNsOorx0Ql3Jh60ncQ8t18hzSlwm+eLT1G9deEVXrDgfiZBxS13Bt wDnNRRWgkYCDq4kZk3H3+xbwnXpyx7jd7P27gmwv/TCTQTiyhr/GhxT224Jj5KW/lo0Bd HO2FOPUsb2nVTvTpIGhQYWtMbKQVTNho8ylRnCk9mWtNXeF/ikNiVkVbdLxClxstSufef Rdj2JSB7dfylZdmBoRUWmMLGUsGhEdX6oCdUOrEL9j/JyyVB/0sKkKH+fsSIVBIi/kA== 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="GwWGXRx/"; 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 4D79860A262F; Sat, 14 Nov 2026 03:23:51 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98F8C1F000C5; Sat, 14 Nov 2026 03:23:50 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794626631; bh=vOrw1y8m+9NBltBknIKtJtVKStAg1SQPVgtsudklyYI=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=GwWGXRx/O/jsDouSZjxag2nP3y6G4U5KyKsm200a31+nqxxetL2IEYX75gMyLv8to qM1UPIdgaRDfJZcMlS4PdCFwO0d3z+lELvENiHyFiAPnPetC2p+uPhTrtvEyr6x1FZ Nax+Z+KYNUThwNTNKfMK2ZSNhsth5uxNSDdGcrFOTMPNEYA4hUMoCpU6LIPWnzsUV4 LEkJA8se37RhIKrm8UT0jSZTpgviyVNV8qsKbJKzDZoLNPR08PHR81V55tGaKshKcA /6JD+g93nNT3gLHCUSQelRdeeT2pJj6fviBOammk7yKif8+Io2nHHGzHGX2uvZqH6m 3QglMcXx9uQHg== X-Cc: netfilter-devel@vger.kernel.org, davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, horms@kernel.org, fw@strlen.de, ja@ssi.bg X-In-Reply-To: <20261113031251.2437074-13-pablo@netfilter.org> X-sashiko-severity: Low 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