Commit 6134d1ea authored by Florian Westphal's avatar Florian Westphal Committed by Greg Kroah-Hartman
Browse files

netfilter: nf_tables: don't unregister hook when table is dormant



[ Upstream commit 688c1501 ]

When nf_tables_updchain encounters an error, hook registration needs to
be rolled back.

This should only be done if the hook has been registered, which won't
happen when the table is flagged as dormant (inactive).

Just move the assignment into the registration block.

Reported-by: default avatar <syzbot+53ed3a6440173ddbf499@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=53ed3a6440173ddbf499


Fixes: b9703ed4 ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 073b0479
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment