diff options
author | Jose Blanquicet <josebl@microsoft.com> | 2021-08-05 19:40:36 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-08-06 18:16:33 +0300 |
commit | 277b134057036df8c657079ca92c3e5e7d10aeaf (patch) | |
tree | bcc8cdfb109f38b87bfc6516b3feb801eaced8c0 /tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c | |
parent | 372642ea83ff1c71a5d567a704c912359eb59776 (diff) | |
download | linux-277b134057036df8c657079ca92c3e5e7d10aeaf.tar.xz |
selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP
Currently, this test is incorrectly printing the destination port in
place of the destination IP.
Fixes: 2767c97765cb ("selftests/bpf: Implement sample tcp/tcp6 bpf_iter programs")
Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210805164044.527903-1-josebl@microsoft.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c b/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c index 2e4775c35414..92267abb462f 100644 --- a/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c +++ b/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c @@ -121,7 +121,7 @@ static int dump_tcp_sock(struct seq_file *seq, struct tcp_sock *tp, } BPF_SEQ_PRINTF(seq, "%4d: %08X:%04X %08X:%04X ", - seq_num, src, srcp, destp, destp); + seq_num, src, srcp, dest, destp); BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d ", state, tp->write_seq - tp->snd_una, rx_queue, |