]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: exthdr: add support for tcp option removal
authorFlorian Westphal <fw@strlen.de>
Fri, 28 Jan 2022 12:00:36 +0000 (13:00 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 4 Feb 2022 05:30:28 +0000 (06:30 +0100)
commit826a710fdf443d5b51472c0c625e0f2ddd652e8f
tree87d76005c04107777a3561ad0bafe13168530dde
parenta6149cebb0355d87260a7c4b23cce5b8dd227a71
netfilter: exthdr: add support for tcp option removal

This allows to replace a tcp option with nop padding to selectively disable
a particular tcp option.

Optstrip mode is chosen when userspace passes the exthdr expression with
neither a source nor a destination register attribute.

This is identical to xtables TCPOPTSTRIP extension.
The only difference is that TCPOPTSTRIP allows to pass in a bitmap
of options to remove rather than a single number.

Unlike TCPOPTSTRIP this expression can be used multiple times
in the same rule to get the same effect.

We could add a new nested attribute later on in case there is a
use case for single-expression-multi-remove.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_exthdr.c