diff options
author | Patrick McHardy <kaber@trash.net> | 2015-03-25 14:08:48 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-03-26 11:09:34 +0100 |
commit | b2832dd6621bf73eb8ad38389a94bd83a5983886 (patch) | |
tree | a60547029ce1982087446a925e811b51e71c1549 /net/netfilter/nft_hash.c | |
parent | 61edafbb47e9f46fb850035b1f8f062564445704 (diff) | |
download | op-kernel-dev-b2832dd6621bf73eb8ad38389a94bd83a5983886.zip op-kernel-dev-b2832dd6621bf73eb8ad38389a94bd83a5983886.tar.gz |
netfilter: nf_tables: return set extensions from ->lookup()
Return the extension area from the ->lookup() function to allow to
consolidate common actions.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_hash.c')
-rw-r--r-- | net/netfilter/nft_hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c index 94bf25d..5bee821 100644 --- a/net/netfilter/nft_hash.c +++ b/net/netfilter/nft_hash.c @@ -66,7 +66,7 @@ static inline int nft_hash_cmp(struct rhashtable_compare_arg *arg, static bool nft_hash_lookup(const struct nft_set *set, const struct nft_data *key, - struct nft_data *data) + const struct nft_set_ext **ext) { struct nft_hash *priv = nft_set_priv(set); const struct nft_hash_elem *he; @@ -76,8 +76,8 @@ static bool nft_hash_lookup(const struct nft_set *set, }; he = rhashtable_lookup_fast(&priv->ht, &arg, nft_hash_params); - if (he && set->flags & NFT_SET_MAP) - nft_data_copy(data, nft_set_ext_data(&he->ext)); + if (he != NULL) + *ext = &he->ext; return !!he; } |