netfilter: nf_tables: skip netdev hook unregistration if table is dormant
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 21 Mar 2024 00:28:07 +0000 (01:28 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 28 Mar 2024 02:54:01 +0000 (03:54 +0100)
commit216e7bf7402caf73f4939a8e0248392e96d7c0da
treece12ad6466db9ca379133495d9c8f97c1b7ccbc0
parent1e1fb6f00f52812277963365d9bd835b9b0ea4e0
netfilter: nf_tables: skip netdev hook unregistration if table is dormant

Skip hook unregistration when adding or deleting devices from an
existing netdev basechain. Otherwise, commit/abort path try to
unregister hooks which not enabled.

Fixes: b9703ed44ffb ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Fixes: 7d937b107108 ("netfilter: nf_tables: support for deleting devices in an existing netdev chain")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c