]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
netfilter: nf_tables: remove NETDEV_CHANGENAME from netdev chain event handler
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 5 Mar 2024 08:38:04 +0000 (09:38 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 May 2024 09:13:55 +0000 (11:13 +0200)
Originally, device name used to be stored in the basechain, but it is
not the case anymore. Remove check for NETDEV_CHANGENAME.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_chain_filter.c

index d170758a1eb5d08929cc4cd8e8acd350e793524e..7010541fcca66f27382bb49297e97a3ca613ad39 100644 (file)
@@ -325,9 +325,6 @@ static void nft_netdev_event(unsigned long event, struct net_device *dev,
        struct nft_hook *hook, *found = NULL;
        int n = 0;
 
-       if (event != NETDEV_UNREGISTER)
-               return;
-
        list_for_each_entry(hook, &basechain->hook_list, list) {
                if (hook->ops.dev == dev)
                        found = hook;
@@ -367,8 +364,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);