bpf, selftests: use :: 1 for localhost in tcp_server.py
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 28 Jul 2020 14:39:02 +0000 (07:39 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Jul 2020 22:10:35 +0000 (00:10 +0200)
commitca5cd355b7f0372da0d50fce5b12a3367e417290
tree45e98ebfacbd3c4fb092ef525c03806b548b39d6
parent3c4f850e8441ac8b3b6dbaa6107604c4199ef01f
bpf, selftests: use :: 1 for localhost in tcp_server.py

Using localhost requires the host to have a /etc/hosts file with that
specific line in it. By default my dev box did not, they used
ip6-localhost, so the test was failing. To fix remove the need for any
/etc/hosts and use ::1.

I could just add the line, but this seems easier.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/159594714197.21431.10113693935099326445.stgit@john-Precision-5820-Tower
tools/testing/selftests/bpf/tcp_client.py
tools/testing/selftests/bpf/tcp_server.py
tools/testing/selftests/bpf/test_netcnt.c