History

netfilter: nf_tables: add userdata attributes to nft_chain

Enables storing userdata for nft_chain. Field udata points to user data and udlen stores its length. Adds new attribute flag NFTA_CHAIN_USERDATA.

Jose M. Guisado Gomez committed 6 years ago

Commit 002f2171 parent 85db8273 files · +29 −8Browse 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
@@ -208,6 +208,7 @@ enum nft_chain_flags { · 207 unmodified lines
208 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)208 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)
209 * @NFTA_CHAIN_FLAGS: chain flags209 * @NFTA_CHAIN_FLAGS: chain flags
210 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)210 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)
211 * @NFTA_CHAIN_USERDATA: user data (NLA_BINARY)
211 */212 */
212enum nft_chain_attributes {213enum nft_chain_attributes {
213 NFTA_CHAIN_UNSPEC,214 NFTA_CHAIN_UNSPEC,
@@ -222,6 +223,7 @@ enum nft_chain_attributes { · 8 unmodified lines
222 NFTA_CHAIN_PAD,223 NFTA_CHAIN_PAD,
223 NFTA_CHAIN_FLAGS,224 NFTA_CHAIN_FLAGS,
224 NFTA_CHAIN_ID,225 NFTA_CHAIN_ID,
226 NFTA_CHAIN_USERDATA,
225 __NFTA_CHAIN_MAX227 __NFTA_CHAIN_MAX
226};228};
227#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)229#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)