]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_queue: fix reinject verdict handling
authorJagdish Motwani <jagdish.motwani@sophos.com>
Mon, 13 May 2019 18:17:40 +0000 (23:47 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 May 2019 14:10:30 +0000 (16:10 +0200)
commit04473f57721710a9b68533dff0b8f243ffa920c5
tree058c9de071f73e83750200207e78dca578014b7c
parentb364b1aba7a9f83d1ac74a835fc298cb99bfc6ce
netfilter: nf_queue: fix reinject verdict handling

This patch fixes netfilter hook traversal when there are more than 1 hooks
returning NF_QUEUE verdict. When the first queue reinjects the packet,
'nf_reinject' starts traversing hooks with a proper hook_index. However,
if it again receives a NF_QUEUE verdict (by some other netfilter hook), it
queues the packet with a wrong hook_index. So, when the second queue
reinjects the packet, it re-executes hooks in between.

Fixes: 9f62bf5133c1 ("netfilter: convert hook list to an array")
Signed-off-by: Jagdish Motwani <jagdish.motwani@sophos.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_queue.c