[PATCH net-next] netfilter: nft_chain_filter: remove redundant code in nf_tables_netdev_event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux