]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: delay chain policy update until transaction is complete
authorFlorian Westphal <fw@strlen.de>
Fri, 12 Apr 2019 09:09:25 +0000 (11:09 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Apr 2019 11:47:32 +0000 (13:47 +0200)
commita7a787ed4ab9872475251e2587464f945ed636a8
tree67f8105ef2babdb19eed62de9caf3e35061ee1bc
parent1c1339091bf1423bbc5b4449e11af1e39e51f05b
netfilter: nf_tables: delay chain policy update until transaction is complete

When we process a long ruleset of the form

chain input {
   type filter hook input priority filter; policy drop;
   ...
}

Then the base chain gets registered early on, we then continue to
process/validate the next messages coming in the same transaction.

Problem is that if the base chain policy is 'drop', it will take effect
immediately, which causes all traffic to get blocked until the
transaction completes or is aborted.

Fix this by deferring the policy until the transaction has been
processed and all of the rules have been flagged as active.

Reported-by: Jann Haber <jann.haber@selfnet.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c