History

netfilter: nf_tables: add NFTA_CHAIN_ID attribute

This netlink attribute allows you to refer to chains inside a transaction as an alternative to the name and the handle. The chain binding support requires this new chain ID approach.

Pablo Neira Ayuso committed 6 years ago

Commit 74cccc31 parent f0a5e4d3 files · +17 −3Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+2−0
@@ -196,6 +196,7 @@ enum nft_table_attributes { · 195 unmodified lines
196 * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING)196 * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING)
197 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)197 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)
198 * @NFTA_CHAIN_FLAGS: chain flags198 * @NFTA_CHAIN_FLAGS: chain flags
199 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)
199 */200 */
200enum nft_chain_attributes {201enum nft_chain_attributes {
201 NFTA_CHAIN_UNSPEC,202 NFTA_CHAIN_UNSPEC,
@@ -209,6 +210,7 @@ enum nft_chain_attributes { · 7 unmodified lines
209 NFTA_CHAIN_COUNTERS,210 NFTA_CHAIN_COUNTERS,
210 NFTA_CHAIN_PAD,211 NFTA_CHAIN_PAD,
211 NFTA_CHAIN_FLAGS,212 NFTA_CHAIN_FLAGS,
213 NFTA_CHAIN_ID,
212 __NFTA_CHAIN_MAX214 __NFTA_CHAIN_MAX
213};215};
214#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)216#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)