OSDN Git Service

netfilter: nft_exthdr: Support SCTP chunks
authorPhil Sutter <phil@nwl.cc>
Tue, 4 May 2021 15:54:06 +0000 (17:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 28 May 2021 19:11:33 +0000 (21:11 +0200)
commit133dc203d77dff617d9c4673973ef3859be2c476
tree5ec0f7906c7c4136590184e3d60721dec661856d
parentaf9207adb6d9986be6ed64e76705cf513087e724
netfilter: nft_exthdr: Support SCTP chunks

Chunks are SCTP header extensions similar in implementation to IPv6
extension headers or TCP options. Reusing exthdr expression to find and
extract field values from them is therefore pretty straightforward.

For now, this supports extracting data from chunks at a fixed offset
(and length) only - chunks themselves are an extensible data structure;
in order to make all fields available, a nested extension search is
needed.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nft_exthdr.c