netfilter: nf_tables: split chain policy validation from actually setting it
authorPatrick McHardy <kaber@trash.net>
Thu, 9 Jan 2014 18:42:31 +0000 (18:42 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 9 Jan 2014 19:17:13 +0000 (20:17 +0100)
commit57de2a0cd9d7e4cfc6479ecbebfcd36dbc61d5ed
treecb7657b0a5752388c10f320db7e2d7db9767cb69
parentb38895c5773b00977ca6beff8ebbd2e3f55f1f84
netfilter: nf_tables: split chain policy validation from actually setting it

Currently nf_tables_newchain() atomicity is broken because of having
validation of some netlink attributes performed after changing attributes
of the chain. The chain policy is (currently) fine, but split it up as
preparation for the following fixes and to avoid future mistakes.

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