Skip to content

Commit bc87b75

Browse files
Phil Sutterummakynes
authored andcommitted
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 <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 880ccec commit bc87b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ static struct nft_hook *nft_hook_list_find(struct list_head *hook_list,
23172317
struct nft_hook *hook;
23182318

23192319
list_for_each_entry(hook, hook_list, list) {
2320-
if (this->ops.dev == hook->ops.dev)
2320+
if (!strcmp(hook->ifname, this->ifname))
23212321
return hook;
23222322
}
23232323

0 commit comments

Comments
 (0)