TCP option matching
cover TCP option matching
This patch set is part of the TCP option matching implementation for nftables.
Manuel Messner (1):
src: add TCP option matching requirements
include/libnftnl/expr.h | 1 + include/linux/netfilter/nf_tables.h | 17 ++++++++++++- src/expr/exthdr.c | 49 ++++++++++++++++++++++++++++++++++--- 3 files changed, 62 insertions(+), 5 deletions(-)
--
2.11.1
PATCH 1/1 src: add TCP option matching requirements
This patch is a requirement of the TCP option patch.
Signed-off-by Manuel Messner <[email protected]>
Reviewed-by Florian Westphal <[email protected]>
--- include/libnftnl/expr.h | 1 + include/linux/netfilter/nf_tables.h | 17 ++++++++++++- src/expr/exthdr.c | 49 ++++++++++++++++++++++++++++++++++--- 3 files changed, 62 insertions(+), 5 deletions(-)
include/libnftnl/expr.h +1 -0
@@ -156,6 +156,7 @@ enum {NFTNL_EXPR_EXTHDR_TYPE ,NFTNL_EXPR_EXTHDR_OFFSET ,NFTNL_EXPR_EXTHDR_LEN , + NFTNL_EXPR_EXTHDR_OP, }; enum {
include/linux/netfilter/nf_tables.h +16 -1
@@ -705,12 +705,13 @@ enum nft_payload_attributes {#define NFTA_PAYLOAD_MAX (__NFTA_PAYLOAD_MAX - 1)/** -* enum nft_exthdr_attributes - nf_tables IPv6 extension header expression netlink attributes +* enum nft_exthdr_attributes - nf_tables extension header expression netlink attributes * * @NFTA_EXTHDR_DREG: destination register (NLA_U32: nft_registers) * @NFTA_EXTHDR_TYPE: extension header type (NLA_U8) * @NFTA_EXTHDR_OFFSET: extension header offset (NLA_U32) * @NFTA_EXTHDR_LEN: extension header length (NLA_U32) +* @NFTA_EXTHDR_OP: option match type (NLA_U8) */ enum nft_exthdr_attributes {NFTA_EXTHDR_UNSPEC ,
@@ -718,11 +719,25 @@ enum nft_exthdr_attributes {NFTA_EXTHDR_TYPE ,NFTA_EXTHDR_OFFSET ,NFTA_EXTHDR_LEN , +NFTA_EXTHDR_OP , __NFTA_EXTHDR_MAX };#define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1)/** +* enum nft_exthdr_op - nf_tables match options +* +* @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers +* @NFT_EXTHDR_OP_TCP: match against tcp options +*/ +enum nft_exthdr_op { +NFT_EXTHDR_OP_IPV6 , +NFT_EXTHDR_OP_TCPOPT , + __NFT_EXTHDR_OP_MAX +}; +#define NFT_EXTHDR_OP_MAX (__NFT_EXTHDR_OP_MAX - 1) + +/** * enum nft_meta_keys - nf_tables meta expression keys * * @NFT_META_LEN: packet length (skb->len)
src/expr/exthdr.c +45 -4
125 lines not on this page · raw message
Signature · 1 line
2.11.1