]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_queue: enqueue skbs with NULL dst
authorMarco Oliverio <marco.oliverio@tanaza.com>
Mon, 2 Dec 2019 18:54:30 +0000 (19:54 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 7 Dec 2019 18:53:00 +0000 (19:53 +0100)
commit5a3451a1503021ddbc35645d0dac90878d1a00d1
treef2ce4b96d6ed153c586208c4e3f8500b2022e9d4
parentb20d43d701263d33abefb8c2ffeeb51194c03a29
netfilter: nf_queue: enqueue skbs with NULL dst

Bridge packets that are forwarded have skb->dst == NULL and get
dropped by the check introduced by
83cdb0257d46d7ded120864ff393e8f7fa7cb01a (net: make skb_dst_force
return true when dst is refcounted).

To fix this we check skb_dst() before skb_dst_force(), so we don't
drop skb packet with dst == NULL. This holds also for skb at the
PRE_ROUTING hook so we remove the second check.

Fixes: 83cdb0257d46 ("net: make skb_dst_force return true when dst is refcounted")
Signed-off-by: Marco Oliverio <marco.oliverio@tanaza.com>
Signed-off-by: Rocco Folino <rocco.folino@tanaza.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_queue.c