]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit66293c46c9314d2b3e80be829a48fed17a848146
tree67f8105ef2babdb19eed62de9caf3e35061ee1bc
parent6c0afef5fb0c27758f4d52b2210c61b6bd8b4470
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