[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240414050251.3923028-1-shaozhengchao@huawei.com>
Date: Sun, 14 Apr 2024 13:02:51 +0800
From: Zhengchao Shao <shaozhengchao@...wei.com>
To: <netfilter-devel@...r.kernel.org>, <coreteam@...filter.org>,
<netdev@...r.kernel.org>, <pablo@...filter.org>, <kadlec@...filter.org>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<shaozhengchao@...wei.com>
Subject: [PATCH net-next] netfilter: nft_chain_filter: remove redundant code in nf_tables_netdev_event
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@...wei.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
Powered by blists - more mailing lists