From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nf-next,v2 2/6] netfilter: nft_payload: access ipip payload for inner offset
Date: Thu, 6 Oct 2022 00:37:36 +0200 [thread overview]
Message-ID: <20221005223740.22991-3-pablo@netfilter.org> (raw)
In-Reply-To: <20221005223740.22991-1-pablo@netfilter.org>
ipip is an special case, transport and inner header offset are set to
the same offset to use the upcoming inner expression for matching on
inner tunnel headers.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
v2: no changes
net/netfilter/nft_payload.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_payload.c
index 78a393d6a7c8..daf336331620 100644
--- a/net/netfilter/nft_payload.c
+++ b/net/netfilter/nft_payload.c
@@ -122,6 +122,9 @@ static int __nft_payload_inner_offset(struct nft_pktinfo *pkt)
pkt->inneroff = thoff + sizeof(struct gre_base_hdr) + offset;
}
break;
+ case IPPROTO_IPIP:
+ pkt->inneroff = thoff;
+ break;
default:
return -1;
}
--
2.30.2
next prev parent reply other threads:[~2022-10-05 22:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 22:37 [PATCH nf-next,v2 0/6] nf_tables inner tunnel header match support Pablo Neira Ayuso
2022-10-05 22:37 ` [PATCH nf-next,v2 1/6] netfilter: nft_payload: access GRE payload via inner offset Pablo Neira Ayuso
2022-10-05 22:37 ` Pablo Neira Ayuso [this message]
2022-10-05 22:37 ` [PATCH nf-next,v2 3/6] netfilter: nft_inner: support for inner tunnel header matching Pablo Neira Ayuso
2022-10-05 22:37 ` [PATCH nf-next,v2 4/6] netfilter: nft_inner: add percpu inner context Pablo Neira Ayuso
2022-10-05 22:37 ` [PATCH nf-next,v2 5/6] netfilter: nft_meta: add inner match support Pablo Neira Ayuso
2022-10-05 22:37 ` [PATCH nf-next,v2 6/6] netfilter: nft_inner: add geneve support Pablo Neira Ayuso
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=20221005223740.22991-3-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).