Currently, the bpf_fib_lookup() helper is only called with the ifindex of veth1. In preparation for calling the bpf_fib_lookup() helper with the ifindex of veth2, enable forwarding on this device. Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- tools/testing/selftests/bpf/prog_tests/fib_lookup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/fib_lookup.c b/tools/testing/selftests/bpf/prog_tests/fib_lookup.c index 77f65ff7784a..14a6515a453d 100644 --- a/tools/testing/selftests/bpf/prog_tests/fib_lookup.c +++ b/tools/testing/selftests/bpf/prog_tests/fib_lookup.c @@ -193,10 +193,18 @@ static int setup_netns(void) if (!ASSERT_OK(err, "write_sysctl(net.ipv4.conf.veth1.forwarding)")) goto fail; + err = write_sysctl("/proc/sys/net/ipv4/conf/veth2/forwarding", "1"); + if (!ASSERT_OK(err, "write_sysctl(net.ipv4.conf.veth2.forwarding)")) + goto fail; + err = write_sysctl("/proc/sys/net/ipv6/conf/veth1/forwarding", "1"); if (!ASSERT_OK(err, "write_sysctl(net.ipv6.conf.veth1.forwarding)")) goto fail; + err = write_sysctl("/proc/sys/net/ipv6/conf/veth2/forwarding", "1"); + if (!ASSERT_OK(err, "write_sysctl(net.ipv6.conf.veth2.forwarding)")) + goto fail; + /* Setup for policy routing tests */ SYS(fail, "ip addr add %s/24 dev veth1", IPV4_LOCAL); SYS(fail, "ip addr add %s/64 dev veth1 nodad", IPV6_LOCAL); -- 2.53.0