Skip to contentSkip to conversation

chain: multi-device support

PATCH New Pablo Neira Ayuso 1 participant 1 message Oct 26, 2019 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH v2 1/1 chain: multi-device support

Add support for NFTA_HOOK_DEVS.

---
v2: fix incorrect size in reallocation.

 include/libnftnl/chain.h            |   1 +
 include/linux/netfilter/nf_tables.h |   2 +
 src/chain.c                         | 109 +++++++++++++++++++++++++++++++++++-
 3 files changed, 111 insertions(+), 1 deletion(-)
include/libnftnl/chain.h +1 -0
index 31b48cf32bed..f84a2a3a20f2 100644
@@ -31,6 +31,7 @@ enum nftnl_chain_attr {
 	NFTNL_CHAIN_HANDLE,
 	NFTNL_CHAIN_TYPE,
 	NFTNL_CHAIN_DEV,
+	NFTNL_CHAIN_DEVICES,
 	__NFTNL_CHAIN_MAX
 };
 #define NFTNL_CHAIN_MAX (__NFTNL_CHAIN_MAX - 1)
include/linux/netfilter/nf_tables.h +2 -0
index 2e49bc6541a4..81c27d3c9ffd 100644
@@ -144,12 +144,14 @@ enum nft_list_attributes {
  * @NFTA_HOOK_HOOKNUM: netfilter hook number (NLA_U32)
  * @NFTA_HOOK_PRIORITY: netfilter hook priority (NLA_U32)
  * @NFTA_HOOK_DEV: netdevice name (NLA_STRING)
+ * @NFTA_HOOK_DEVS: list of netdevices (NLA_NESTED)
  */
 enum nft_hook_attributes {
 	NFTA_HOOK_UNSPEC,
 	NFTA_HOOK_HOOKNUM,
 	NFTA_HOOK_PRIORITY,
 	NFTA_HOOK_DEV,
+	NFTA_HOOK_DEVS,
 	__NFTA_HOOK_MAX
 };
 #define NFTA_HOOK_MAX		(__NFTA_HOOK_MAX - 1)
src/chain.c +108 -1

196 lines not on this page · raw message

Signature · 1 line
2.11.0