History

netfilter: nft_numgen: add map lookups for numgen statements

This patch includes a new attribute in the numgen structure to allow the lookup of an element based on the number generator as a key. For this purpose, different ops have been included to extend the current numgen inc functions. Currently, only supported for numgen incremental operations, but it will be supported for random in a follow-up patch.

Laura Garcia Liebana committed 8 years ago

Commit d734a281 parent 8b2ebb62 files · +84 −5Browse files

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

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+4−0
@@ -1450,6 +1450,8 @@ enum nft_trace_types { · 1449 unmodified lines
14501450 * @NFTA_NG_MODULUS: maximum counter value (NLA_U32)
14511451 * @NFTA_NG_TYPE: operation type (NLA_U32)
14521452 * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32)
1453+ * @NFTA_NG_SET_NAME: name of the map to lookup (NLA_STRING)
1454+ * @NFTA_NG_SET_ID: id of the map (NLA_U32)
14531455 */
14541456 enum nft_ng_attributes {
14551457 NFTA_NG_UNSPEC,
@@ -1457,6 +1459,8 @@ enum nft_ng_attributes { · 1 unmodified line
14571459 NFTA_NG_MODULUS,
14581460 NFTA_NG_TYPE,
14591461 NFTA_NG_OFFSET,
1462+ NFTA_NG_SET_NAME,
1463+ NFTA_NG_SET_ID,
14601464 __NFTA_NG_MAX
14611465 };
14621466 #define NFTA_NG_MAX (__NFTA_NG_MAX - 1)