Skip to content

Commit 287b4cc

Browse files
blanquicetgregkh
authored andcommitted
selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP
[ Upstream commit 277b134 ] Currently, this test is incorrectly printing the destination port in place of the destination IP. Fixes: 2767c97 ("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 17ada25 commit 287b4cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int dump_tcp_sock(struct seq_file *seq, struct tcp_sock *tp,
122122
}
123123

124124
BPF_SEQ_PRINTF(seq, "%4d: %08X:%04X %08X:%04X ",
125-
seq_num, src, srcp, destp, destp);
125+
seq_num, src, srcp, dest, destp);
126126
BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d ",
127127
state,
128128
tp->write_seq - tp->snd_una, rx_queue,

0 commit comments

Comments
 (0)