mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-23 22:21:38 -05:00
netfilter: nf_tables: Compare netdev hooks based on stored name
The 1:1 relationship between nft_hook and nf_hook_ops is about to break, so choose the stored ifname to uniquely identify hooks. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
880ccec0d0
commit
bc87b75847
@@ -2317,7 +2317,7 @@ static struct nft_hook *nft_hook_list_find(struct list_head *hook_list,
|
||||
struct nft_hook *hook;
|
||||
|
||||
list_for_each_entry(hook, hook_list, list) {
|
||||
if (this->ops.dev == hook->ops.dev)
|
||||
if (!strcmp(hook->ifname, this->ifname))
|
||||
return hook;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user