Article View: linux.kernel.netdev
Article #4448[PATCH net-next 12/15] netfilter: flowtable: set inner protocol when popping tunnel header
From: Pablo Neira Ayuso
Date: Sun, 18 Oct 2026 00:56
Date: Sun, 18 Oct 2026 00:56
33 lines
6795 bytes
6795 bytes
From: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Pop the outer tunnel header and set skb->protocol to the inner protocol derived from ctx->tun.inner_proto in nf_flow_ip_tunnel_pop(), instead of bailing out unless the tunnel carries IP-in-IP or IPv6-in-IPv6. This is a preliminary patch to support IPv4 over IPv6 and SIT tunnel flowtable offload. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> --- net/netfilter/nf_flow_table_ip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c index c8c29a9a1684..29d1a9f4a362 100644 --- a/net/netfilter/nf_flow_table_ip.c +++ b/net/netfilter/nf_flow_table_ip.c @@ -372,6 +372,11 @@ static void nf_flow_ip_tunnel_pop(struct nf_flowtable_ctx *ctx, skb_pull(skb, ctx->tun.hdr_size); skb_reset_network_header(skb); + + if (ctx->tun.inner_proto == IPPROTO_IPIP) + skb->protocol = htons(ETH_P_IP); + else + skb->protocol = htons(ETH_P_IPV6); } static bool nf_flow_skb_encap_protocol(struct nf_flowtable_ctx *ctx, -- 2.47.3
Technical Details
Message-ID:
<20261018005638.1776148-13-pablo@netfilter.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347893-linux-kernel-netdev=dewy.ruReferences:
<20261018005638.1776148-1-pablo@netfilter.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347893-linux-kernel-netdev=dewy.ru From: pablo@netfilter.org (Pablo Neira Ayuso) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next 12/15] netfilter: flowtable: set inner protocol when popping tunnel header Date: Sun, 18 Oct 2026 02:56:35 +0200 Organization: Usenet Network Message-ID: <20261018005638.1776148-13-pablo@netfilter.org> References: <20261018005638.1776148-1-pablo@netfilter.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3187715"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Uw+gzXKNqaZ7xdwMD3Qd/nnTYio= sha256:W06eVO3LlEvga5ZKm43hLsC4EnPu2H2ouGY3A881alw= sha1:QFkSmrF8VQFHrhAo0QMzrARmRiI= sha256:7knlx3uLwHhP7B5Qj4zQBScRP9tnB2qxMG+6SM2bmIo= 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 CFDB511078A; Sun, 18 Oct 2026 04:01:28 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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=netfilter.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 Vm5uwp1xSIa1; Sun, 18 Oct 2026 04:01:26 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-347893-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=netfilter.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3CBAC11030B; Sun, 18 Oct 2026 04:01:18 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 04AE137BBF; Sun, 18 Oct 2026 00:57:09 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE52530C157; Sun, 18 Oct 2026 00:57:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org header.b="XnAq4c5j" X-Received: from mail.netfilter.org (mail.netfilter.org [217.70.190.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F854308F26; Sun, 18 Oct 2026 00:57:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.190.124 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792285028; cv=none; b=cqHQzioNvov9v081CbqWRyIzVjjZPN63kRA0v+LdpfWuPZhi4bHViTx/VVzQ2yoYX4aOx+SeCmjYJzRzG1U4HHSJmL8KVgbjKXLpkbdgnfsyW0u7ExPNKUM5cCCKmY/2yBYtuUhSHUQ/v3pegpvfHuV0e0kI/R4VP9an1pKiL/k= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792285028; c=relaxed/simple; bh=M8EiWmnZPblM9PRYIkf275JcEMCI/XIBLaF9VyXMPSU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uSkVDxuUFN0FVGdGaOu65pnikfAw9fFENaefmLo1VPMJswCVsiLBr4rUcpo6HxiodQd0dyfjnnWKqqDXrOlPYsLJLajHA6zaK45ngl1cUfnFE/RX8MmxzHnHPOMAIWuohPPFg81AK5jOT/IlYaTYVeNFA1pmIVn+H3a5qabwyYM= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org header.b=XnAq4c5j; arc=none smtp.client-ip=217.70.190.124 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org; s=2025; t=1792285023; bh=Br3P5vkq2nYPAa+oveIQfLLzQmD/uC7QmebOvbDBymE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XnAq4c5jm6JC7QWWABpmhHzWb/Dkw/XewCAhkPC3ZO5E1ATMkhUaiu+Sgx0Pw6TKz BatbDwwz+fFeyjqvQsET1J4y2ElZ6Nzz3mzy13CmmbreFdyh4Cyiqui6O6BXKImFZ1 0F6Mw/i/bTrq7ALeOFB2Zl46aE377nJ9a/FA2oI/Mz+TKILzODFMuJ7rHNbyT4pPw/ sxJAoYADyqCwAEMcJpyHQ5erTXlgKbU5SFis0ZqhaiyFGrKSwNeRwYTp1hROmc3Tqb mqu4IUuNR3ytWo96oZbMW19pXTn2r2NWoJiqiYLKCwJX6e+NSR0xrgvTVb9vFpRG/l sUDRgi7H2skdg== X-Received: from localhost.localdomain (mail-agni [217.70.190.124]) by mail.netfilter.org (Postfix) with ESMTPSA id 2335260081; Sun, 18 Oct 2026 02:57:03 +0200 (CEST) X-Cc: 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-Mailer: git-send-email 2.47.3 X-In-Reply-To: <20261018005638.1776148-1-pablo@netfilter.org> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>