summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2025-01-09 18:31:35 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2025-01-19 16:41:53 +0100
commitbc87b75847d86f073a3df56e4ad44265b3d64e44 (patch)
tree14efabfa5c0a512c3f7dc5b0985ceb299ae86493 /net
parent880ccec0d02efb24900f589d0cac826af1d91523 (diff)
downloadlinux-bc87b75847d86f073a3df56e4ad44265b3d64e44.tar.gz
linux-bc87b75847d86f073a3df56e4ad44265b3d64e44.tar.bz2
linux-bc87b75847d86f073a3df56e4ad44265b3d64e44.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 87175cd1d39b..ed15c52e3c65 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -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;
}