netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next 0/2] nf_tables: vlan matching & mangling
@ 2024-05-10  0:07 Pablo Neira Ayuso
  2024-05-10  0:07 ` [PATCH nf-next 1/2] netfilter: nft_payload: restore vlan q-in-q match support Pablo Neira Ayuso
  2024-05-10  0:07 ` [PATCH nf-next 2/2] netfilter: nft_payload: skbuff vlan metadata mangle support Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2024-05-10  0:07 UTC (permalink / raw)
  To: netfilter-devel

Hi,

This patchset revisits vlan matching & mangling support for nf_tables:

Patch #1 restores q-in-q matching by reverting
         f6ae9f120dad ("netfilter: nft_payload: add C-VLAN support").
         Support for matching on inner vlan headers when vlan offload
	 was already available before such commit.

Patch #2 adds a parser to deal with setting the skbuff vlan offload
         fields based on the payload offset and length. Userspace is
	 agnostic of the kernel vlan offload capabilities, hence,
	 kernel checks if offset and length refers to the skbuff
	 vlan_proto and vlan_tci fields. This also supports mangling
	 q-in-q too.

Note #2 only supports for vlan tag mangling: For pop/push tags a new
actions is required, I already made code for pushing tags which never
got integrated that I can polish and prepare for submission.

I am currently extending tests/shell/testcases/packetpath/vlan_8021ad_tag
to improve coverage for these two cases. I have already have a few
scripts to test this patches with containers but I need to integrate
them into the aforementioned tests/shell script, I will keep you posted.

Pablo Neira Ayuso (2):
  netfilter: nft_payload: restore vlan q-in-q match support
  netfilter: nft_payload: skbuff vlan metadata mangle support

 net/netfilter/nft_payload.c | 95 ++++++++++++++++++++++++++++---------
 1 file changed, 72 insertions(+), 23 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-10 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-10  0:07 [PATCH nf-next 0/2] nf_tables: vlan matching & mangling Pablo Neira Ayuso
2024-05-10  0:07 ` [PATCH nf-next 1/2] netfilter: nft_payload: restore vlan q-in-q match support Pablo Neira Ayuso
2024-05-10  0:07 ` [PATCH nf-next 2/2] netfilter: nft_payload: skbuff vlan metadata mangle support Pablo Neira Ayuso
2024-05-10 13:11   ` kernel test robot

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).