Commit feb1fa2
netfilter: nf_tables: don't unregister hook when table is dormant
[ Upstream commit 688c150 ]
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: syzbot+53ed3a6440173ddbf499@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=53ed3a6440173ddbf499
Fixes: b9703ed ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 86bd960 commit feb1fa2
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2732 | 2732 | | |
2733 | 2733 | | |
2734 | 2734 | | |
| 2735 | + | |
| 2736 | + | |
2735 | 2737 | | |
2736 | 2738 | | |
2737 | 2739 | | |
2738 | | - | |
2739 | | - | |
2740 | 2740 | | |
2741 | 2741 | | |
2742 | 2742 | | |
| |||
0 commit comments