]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: When forwarding count rx stats on the orig netdev
authorStephen Suryaputra <ssuryaextr@gmail.com>
Thu, 14 Oct 2021 13:08:45 +0000 (09:08 -0400)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Oct 2021 22:32:04 +0000 (15:32 -0700)
commit2d9ea6f3e20b35653b8a0b735d3dd3e5d52b78a3
treeca3d4db9a3a182d244c215e63bd13ae47f6ab9b3
parent643c643083e92ecceca7d32839f03f5b5a993b0b
ipv6: When forwarding count rx stats on the orig netdev

Commit 93a7fa0b37f3 ("ipv6: Count interface receive statistics on the
ingress netdev") does not work when ip6_forward() executes on the skbs
with vrf-enslaved netdev. Use IP6CB(skb)->iif to get to the right one.

Add a selftest script to verify.

Fixes: 93a7fa0b37f3 ("ipv6: Count interface receive statistics on the ingress netdev")
Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20211014130845.410602-1-ssuryaextr@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/ip6_output.c
tools/testing/selftests/net/forwarding/Makefile
tools/testing/selftests/net/forwarding/forwarding.config.sample
tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/lib.sh