diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 1ed034a47bd0..c626183e658a 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -9834,6 +9834,7 @@ static int nft_flowtable_event(unsigned long event, struct net_device *dev, if (!ops || (changename && match)) continue; + printk(KERN_INFO "%s: unregistering device %s@%p with flowtable @%p\n", __func__, dev->name, dev, flowtable); /* flow_offload_netdev_event() cleans up entries for us. */ nft_unregister_flowtable_ops(dev_net(dev), flowtable, ops); @@ -9841,10 +9842,14 @@ static int nft_flowtable_event(unsigned long event, struct net_device *dev, kfree_rcu(ops, rcu); break; case NETDEV_REGISTER: + if (match && !changename && ops) + printk(KERN_ERR "%s: found already registered device %s@%p with flowtable @%p\n", __func__, dev->name, dev, flowtable); + /* NOP if not matching or already registered */ if (!match || (changename && ops)) continue; + printk(KERN_INFO "%s: registering device %s@%p with flowtable @%p\n", __func__, dev->name, dev, flowtable); ops = kzalloc(sizeof(struct nf_hook_ops), GFP_KERNEL_ACCOUNT); if (!ops)