OSDN Git Service

netfilter: Fix rpfilter dropping vrf packets by mistake
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 2 Jul 2019 03:59:36 +0000 (03:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:12:43 +0000 (10:12 +0200)
commit307b6e5d90dc19cae65392ea8ad6152954e5e954
treeee43e5404a21501b3fceeb4ea0b4679b27b6d448
parent6f9dff8d1d581e776caeb4dae65453bda2eb9d92
netfilter: Fix rpfilter dropping vrf packets by mistake

[ Upstream commit b575b24b8eee37f10484e951b62ce2a31c579775 ]

When firewalld is enabled with ipv4/ipv6 rpfilter, vrf
ipv4/ipv6 packets will be dropped. Vrf device will pass
through netfilter hook twice. One with enslaved device
and another one with l3 master device. So in device may
dismatch witch out device because out device is always
enslaved device.So failed with the check of the rpfilter
and drop the packets by mistake.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/netfilter/ipt_rpfilter.c
net/ipv6/netfilter/ip6t_rpfilter.c