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. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
978d8f9055
commit
b9ccc07e3f
@@ -856,6 +856,8 @@ enum nft_hash_types {
|
||||
* @NFTA_HASH_SEED: seed value (NLA_U32)
|
||||
* @NFTA_HASH_OFFSET: add this offset value to hash result (NLA_U32)
|
||||
* @NFTA_HASH_TYPE: hash operation (NLA_U32: nft_hash_types)
|
||||
* @NFTA_HASH_SET_NAME: name of the map to lookup (NLA_STRING)
|
||||
* @NFTA_HASH_SET_ID: id of the map (NLA_U32)
|
||||
*/
|
||||
enum nft_hash_attributes {
|
||||
NFTA_HASH_UNSPEC,
|
||||
@@ -866,6 +868,8 @@ enum nft_hash_attributes {
|
||||
NFTA_HASH_SEED,
|
||||
NFTA_HASH_OFFSET,
|
||||
NFTA_HASH_TYPE,
|
||||
NFTA_HASH_SET_NAME,
|
||||
NFTA_HASH_SET_ID,
|
||||
__NFTA_HASH_MAX,
|
||||
};
|
||||
#define NFTA_HASH_MAX (__NFTA_HASH_MAX - 1)
|
||||
|
||||
Reference in New Issue
Block a user