diff options
author | Stephen Suryaputra <ssuryaextr@gmail.com> | 2019-04-27 09:14:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-29 23:28:52 -0400 |
commit | 1d3fd8a10bedb09006cfc963bfcf051c3021f626 (patch) | |
tree | 0defdb8585894f41f22272625c6d32987a4fa53e /net/9p | |
parent | ca2fe2956acef2f87f6c55549874fdd2e92d9824 (diff) | |
download | linux-1d3fd8a10bedb09006cfc963bfcf051c3021f626.tar.bz2 |
vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach
When there is no route to an IPv6 dest addr, skb_dst(skb) points
to loopback dev in the case of that the IP6CB(skb)->iif is
enslaved to a vrf. This causes Ip6InNoRoutes to be incremented on the
loopback dev. This also causes the lookup to fail on icmpv6_send() and
the dest unreachable to not sent and Ip6OutNoRoutes gets incremented on
the loopback dev.
To reproduce:
* Gateway configuration:
ip link add dev vrf_258 type vrf table 258
ip link set dev enp0s9 master vrf_258
ip addr add 66:1/64 dev enp0s9
ip -6 route add unreachable default metric 8192 table 258
sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv6.conf.enp0s9.forwarding=1
* Sender configuration:
ip addr add 66::2/64 dev enp0s9
ip -6 route add default via 66::1
and ping 67::1 for example from the sender.
Fix this by counting on the original netdev and reset the skb dst to
force a fresh lookup.
v2: Fix typo of destination address in the repro steps.
v3: Simplify the loopback check (per David Ahern) and use reverse
Christmas tree format (per David Miller).
Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Tested-by: David Ahern <dsahern@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/9p')
0 files changed, 0 insertions, 0 deletions