]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Apr 2018 02:05:03 +0000 (22:05 -0400)
commit29ed301c5d0c74ba1498a8ee8989c2ad9f234748
tree6295726be33da14559afceabb1547cd1fca24b19
parent2320d3fb3af815de678e8f15bdd80f76c6424083
arp: fix arp_filter on l3slave devices

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: fe72c20b1eac ("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>
net/ipv4/arp.c