]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arp: fix arp_filter on l3slave devices
authorMiguel Fadon Perlines <mfadon@teldat.com>
Thu, 5 Apr 2018 08:25:38 +0000 (10:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:31:15 +0000 (12:31 +0200)
commit30d032b72d0697924cc495164aee9c796b4e1039
tree3cec90c537c8042278b1de41cb274a85222e0fb9
parentfea978223b59a9d6d358b0301d12d5997c43dcfd
arp: fix arp_filter on l3slave devices

[ Upstream commit 58b35f27689b5eb514fc293c332966c226b1b6e4 ]

arp_filter performs an ip_route_output search for arp source address and
checks if output device is the same where the arp request was received,
if it is not, the arp request is not answered.

This route lookup is always done on main route table so l3slave devices
never find the proper route and arp is not answered.

Passing l3mdev_master_ifindex_rcu(dev) return value as oif fixes the
lookup for l3slave devices while maintaining same behavior for non
l3slave devices as this function returns 0 in that case.

Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX")
Signed-off-by: Miguel Fadon Perlines <mfadon@teldat.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/arp.c