Message ID | 20240414050251.3923028-1-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] netfilter: nft_chain_filter: remove redundant code in nf_tables_netdev_event | expand |
diff --git a/net/netfilter/nft_chain_filter.c b/net/netfilter/nft_chain_filter.c index 274b6f7e6bb5..22057df9bbdc 100644 --- a/net/netfilter/nft_chain_filter.c +++ b/net/netfilter/nft_chain_filter.c @@ -365,8 +365,7 @@ static int nf_tables_netdev_event(struct notifier_block *this, .net = dev_net(dev), }; - if (event != NETDEV_UNREGISTER && - event != NETDEV_CHANGENAME) + if (event != NETDEV_UNREGISTER) return NOTIFY_DONE; nft_net = nft_pernet(ctx.net);
Since commit d54725cd11a5("netfilter: nf_tables: support for multiple devices per netdev hook") has been merged, nft_netdev_event only process events of NETDEV_UNREGISTRATION type. Therefore, nf_tables_netdev_event can directly return events of non-NETDEV_UNREGISTRATION type. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> --- net/netfilter/nft_chain_filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)