Commit 277b1340 authored by Jose Blanquicet's avatar Jose Blanquicet Committed by Daniel Borkmann

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: 2767c977 ("selftests/bpf: Implement sample tcp/tcp6 bpf_iter programs")
Signed-off-by: default avatarJose Blanquicet <josebl@microsoft.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210805164044.527903-1-josebl@microsoft.com
parent 372642ea
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment