]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: fix error handling of rule replacement
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 4 Mar 2015 16:55:27 +0000 (17:55 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 4 Mar 2015 17:46:08 +0000 (18:46 +0100)
commit9ccee5abe27e8b1181e61c0ce5c03c6c2dba1d66
treed128e560d9936517baaf94261444682fae727097
parent594a98afb45faaaf265b47981d85f0cd85255c07
netfilter: nf_tables: fix error handling of rule replacement

In general, if a transaction object is added to the list successfully,
we can rely on the abort path to undo what we've done. This allows us to
simplify the error handling of the rule replacement path in
nf_tables_newrule().

This implicitly fixes an unnecessary removal of the old rule, which
needs to be left in place if we fail to replace.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c