History

netfilter: nft_hash: add map lookups for hashing operations

This patch creates new attributes to accept a map as argument and then perform the lookup with the generated hash accordingly. Both current hash functions are supported: Jenkins and Symmetric Hash.

Laura Garcia Liebana committed 8 years ago

Commit b9ccc071 parent 978d8f92 files · +134 −1Browse 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
@@ -856,6 +856,8 @@ enum nft_hash_types { · 855 unmodified lines
856856 * @NFTA_HASH_SEED: seed value (NLA_U32)
857857 * @NFTA_HASH_OFFSET: add this offset value to hash result (NLA_U32)
858858 * @NFTA_HASH_TYPE: hash operation (NLA_U32: nft_hash_types)
859+ * @NFTA_HASH_SET_NAME: name of the map to lookup (NLA_STRING)
860+ * @NFTA_HASH_SET_ID: id of the map (NLA_U32)
859861 */
860862 enum nft_hash_attributes {
861863 NFTA_HASH_UNSPEC,
@@ -866,6 +868,8 @@ enum nft_hash_attributes { · 4 unmodified lines
866868 NFTA_HASH_SEED,
867869 NFTA_HASH_OFFSET,
868870 NFTA_HASH_TYPE,
871+ NFTA_HASH_SET_NAME,
872+ NFTA_HASH_SET_ID,
869873 __NFTA_HASH_MAX,
870874 };
871875 #define NFTA_HASH_MAX (__NFTA_HASH_MAX - 1)