History

netfilter: nf_tables: support optional userdata for set elements

Add an userdata set extension and allow the user to attach arbitrary data to set elements. This is intended to hold TLV encoded data like comments or DNS annotations that have no meaning to the kernel.

Patrick McHardy committed 11 years ago

Commit 68e942e1 parent 22fe54d3 files · +43 −0Browse files

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

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+2−0
@@ -292,6 +292,7 @@ enum nft_set_elem_flags { · 291 unmodified lines
292292 * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32)
293293 * @NFTA_SET_ELEM_TIMEOUT: timeout value (NLA_U64)
294294 * @NFTA_SET_ELEM_EXPIRATION: expiration time (NLA_U64)
295+ * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY)
295296 */
296297 enum nft_set_elem_attributes {
297298 NFTA_SET_ELEM_UNSPEC,
@@ -300,6 +301,7 @@ enum nft_set_elem_attributes { · 2 unmodified lines
300301 NFTA_SET_ELEM_FLAGS,
301302 NFTA_SET_ELEM_TIMEOUT,
302303 NFTA_SET_ELEM_EXPIRATION,
304+ NFTA_SET_ELEM_USERDATA,
303305 __NFTA_SET_ELEM_MAX
304306 };
305307 #define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)