For the sake of simplicity, treat them like consecutive NETDEV_UNREGISTER and NETDEV_REGISTER events. Signed-off-by: Phil Sutter <phil@xxxxxx> --- net/netfilter/nf_tables_api.c | 4 ++++ net/netfilter/nft_chain_filter.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 40cff8539c74..88528775732a 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -9361,6 +9361,10 @@ static int nf_tables_flowtable_event(struct notifier_block *this, struct nft_table *table; struct net *net; + if (event == NETDEV_CHANGENAME) { + nf_tables_flowtable_event(this, NETDEV_UNREGISTER, ptr); + event = NETDEV_REGISTER; + } if (event != NETDEV_REGISTER && event != NETDEV_UNREGISTER) return NOTIFY_DONE; diff --git a/net/netfilter/nft_chain_filter.c b/net/netfilter/nft_chain_filter.c index ec44c27a9d91..4f13591e5cd1 100644 --- a/net/netfilter/nft_chain_filter.c +++ b/net/netfilter/nft_chain_filter.c @@ -372,6 +372,10 @@ static int nf_tables_netdev_event(struct notifier_block *this, .net = dev_net(dev), }; + if (event == NETDEV_CHANGENAME) { + nf_tables_netdev_event(this, NETDEV_UNREGISTER, ptr); + event = NETDEV_REGISTER; + } if (event != NETDEV_REGISTER && event != NETDEV_UNREGISTER) return NOTIFY_DONE; -- 2.43.0