]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: reverse order in rule replacement expansion
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Sep 2021 22:27:38 +0000 (00:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 28 Sep 2021 11:04:56 +0000 (13:04 +0200)
commit98e34ddb665e79f0434bd5a113056f3d285c2363
tree817fd061d9ed87935049b38413ec33fdbe53f1ca
parentb1abb875b63ded0285f9d0044ff224582dbd99fb
netfilter: nf_tables: reverse order in rule replacement expansion

Deactivate old rule first, then append the new rule, so rule replacement
notification via netlink first reports the deletion of the old rule with
handle X in first place, then it adds the new rule (reusing the handle X
of the replaced old rule).

Note that the abort path releases the transaction that has been created
by nft_delrule() on error.

Fixes: c162c8848cdf ("netfilter: nf_tables: deactivate expressions in rule replecement routine")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c