The test_flow_dissector and test_lwt_ip_encap selftests were failing for me.
It was caused by the tests not being enough system/distro independent.
Jiri Benc (2):
selftests/bpf: set rp_filter in test_flow_dissector
selftests/bpf: more compatible nc options in test_lwt_ip_encap
tools/testing/selftests/bpf/test_flow_dissector.sh | 3 +++
tools/testing/selftests/bpf/test_lwt_ip_encap.sh | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
--
2.18.1
Many distributions enable rp_filter. However, the flow dissector test
generates packets that have 1.1.1.1 set as (inner) source address without
this address being reachable. This causes the selftest to fail.
The selftests should not assume a particular initial configuration. Switch
off rp_filter.
Fixes: 50b3ed57dee9 ("selftests/bpf: test bpf flow dissection")
Cc: Petar Penkov <redacted>
Signed-off-by: Jiri Benc <redacted>
---
tools/testing/selftests/bpf/test_flow_dissector.sh | 3 +++
1 file changed, 3 insertions(+)
Out of the three nc implementations widely in use, at least two (BSD netcat
and nmap-ncat) do not support -l combined with -s. Modify the nc invocation
to be accepted by all of them.
Fixes: 17a90a788473 ("selftests/bpf: test that GSO works in lwt_ip_encap")
Cc: Peter Oskolkov <redacted>
Signed-off-by: Jiri Benc <redacted>
---
tools/testing/selftests/bpf/test_lwt_ip_encap.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Petar Penkov <hidden> Date: 2019-10-08 16:45:26
On Tue, Oct 8, 2019 at 6:11 AM Jiri Benc [off-list ref] wrote:
Many distributions enable rp_filter. However, the flow dissector test
generates packets that have 1.1.1.1 set as (inner) source address without
this address being reachable. This causes the selftest to fail.
The selftests should not assume a particular initial configuration. Switch
off rp_filter.
Fixes: 50b3ed57dee9 ("selftests/bpf: test bpf flow dissection")
Cc: Petar Penkov <redacted>
Signed-off-by: Jiri Benc <redacted>
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2019-10-08 22:03:05
On Tue, Oct 08, 2019 at 03:10:43PM +0200, Jiri Benc wrote:
The test_flow_dissector and test_lwt_ip_encap selftests were failing for me.
It was caused by the tests not being enough system/distro independent.
Jiri Benc (2):
selftests/bpf: set rp_filter in test_flow_dissector
selftests/bpf: more compatible nc options in test_lwt_ip_encap
tools/testing/selftests/bpf/test_flow_dissector.sh | 3 +++
tools/testing/selftests/bpf/test_lwt_ip_encap.sh | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)