Skip to content

Commit 86fe2c1

Browse files
committed
netfilter: nftables: skip hook overlap logic if flowtable is stale
If the flowtable has been previously removed in this batch, skip the hook overlap checks. This fixes spurious EEXIST errors when removing and adding the flowtable in the same batch. Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 740b486 commit 86fe2c1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

net/netfilter/nf_tables_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6783,6 +6783,9 @@ static int nft_register_flowtable_net_hooks(struct net *net,
67836783

67846784
list_for_each_entry(hook, hook_list, list) {
67856785
list_for_each_entry(ft, &table->flowtables, list) {
6786+
if (!nft_is_active_next(net, ft))
6787+
continue;
6788+
67866789
list_for_each_entry(hook2, &ft->hook_list, list) {
67876790
if (hook->ops.dev == hook2->ops.dev &&
67886791
hook->ops.pf == hook2->ops.pf) {

0 commit comments

Comments
 (0)