OSDN Git Service

selftests/bpf: Add existing connection bpf_*_ct_lookup() test
authorDaniel Xu <dxu@dxuuu.xyz>
Thu, 11 Aug 2022 21:55:25 +0000 (15:55 -0600)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 15 Aug 2022 18:53:24 +0000 (20:53 +0200)
commite81fbd4c1ba7b128a198c2843665e1186db449b6
treeb3064050989e3654fb0e8437b0424d67e21e1a3d
parentcea558855c39b7f1f02ff50dcf701ca6596bc964
selftests/bpf: Add existing connection bpf_*_ct_lookup() test

Add a test where we do a conntrack lookup on an existing connection.
This is nice because it's a more realistic test than artifically
creating a ct entry and looking it up afterwards.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/de5a617832f38f8b5631cc87e2a836da7c94d497.1660254747.git.dxu@dxuuu.xyz
tools/testing/selftests/bpf/prog_tests/bpf_nf.c
tools/testing/selftests/bpf/progs/test_bpf_nf.c