]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Fix redirect with VRF
authorDavid Ahern <dsahern@gmail.com>
Wed, 22 May 2019 22:12:18 +0000 (15:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2019 00:58:21 +0000 (17:58 -0700)
commit181a59177902c4a68dbb7e810cfed897cc02c53c
treec0c91bbbfafebd822983f190c0bc2202be867c2a
parent0f815717afa3f7d6b790f1b51caf7c01823c96a8
ipv6: Fix redirect with VRF

IPv6 redirect is broken for VRF. __ip6_route_redirect walks the FIB
entries looking for an exact match on ifindex. With VRF the flowi6_oif
is updated by l3mdev_update_flow to the l3mdev index and the
FLOWI_FLAG_SKIP_NH_OIF set in the flags to tell the lookup to skip the
device match. For redirects the device match is requires so use that
flag to know when the oif needs to be reset to the skb device index.

Fixes: b206d57efad8 ("net: Add VRF support to IPv6 stack")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c