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.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -292,6 +292,7 @@ enum nft_set_elem_flags { · 291 unmodified lines | |||
| 292 | * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32) | 292 | * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32) |
| 293 | * @NFTA_SET_ELEM_TIMEOUT: timeout value (NLA_U64) | 293 | * @NFTA_SET_ELEM_TIMEOUT: timeout value (NLA_U64) |
| 294 | * @NFTA_SET_ELEM_EXPIRATION: expiration time (NLA_U64) | 294 | * @NFTA_SET_ELEM_EXPIRATION: expiration time (NLA_U64) |
| 295 | * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY) | ||
| 295 | */ | 296 | */ |
| 296 | enum nft_set_elem_attributes { | 297 | enum nft_set_elem_attributes { |
| 297 | NFTA_SET_ELEM_UNSPEC, | 298 | NFTA_SET_ELEM_UNSPEC, |
| @@ -300,6 +301,7 @@ enum nft_set_elem_attributes { · 2 unmodified lines | |||
| 300 | NFTA_SET_ELEM_FLAGS, | 301 | NFTA_SET_ELEM_FLAGS, |
| 301 | NFTA_SET_ELEM_TIMEOUT, | 302 | NFTA_SET_ELEM_TIMEOUT, |
| 302 | NFTA_SET_ELEM_EXPIRATION, | 303 | NFTA_SET_ELEM_EXPIRATION, |
| 304 | NFTA_SET_ELEM_USERDATA, | ||
| 303 | __NFTA_SET_ELEM_MAX | 305 | __NFTA_SET_ELEM_MAX |
| 304 | }; | 306 | }; |
| 305 | #define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1) | 307 | #define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1) |