* [PATCH net-next] netfilter: nft_chain_filter: remove redundant code in nf_tables_netdev_event
@ 2024-04-14 5:02 Zhengchao Shao
0 siblings, 0 replies; only message in thread
From: Zhengchao Shao @ 2024-04-14 5:02 UTC (permalink / raw)
To: netfilter-devel, coreteam, netdev, pablo, kadlec, davem,
edumazet, kuba, pabeni
Cc: weiyongjun1, yuehaibing, shaozhengchao
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(-)
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);
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-14 4:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-14 5:02 [PATCH net-next] netfilter: nft_chain_filter: remove redundant code in nf_tables_netdev_event Zhengchao Shao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).