selftests/bpf: Fix BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL for empty flow label
authorStanislav Fomichev <sdf@google.com>
Tue, 21 Feb 2023 18:05:18 +0000 (10:05 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 22 Feb 2023 21:13:13 +0000 (13:13 -0800)
commit9fa02892857ae2b3b699630e5ede28f72106e7e7
tree2bbf341bb97cd0681cc6356cdc915cac434b7e2b
parentd40c3847b485acc3522b62b020f77dcd38ca357f
selftests/bpf: Fix BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL for empty flow label

Kernel's flow dissector continues to parse the packet when
the (optional) IPv6 flow label is empty even when instructed
to stop (via BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL). Do
the same in our reference BPF reimplementation.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20230221180518.2139026-1-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/flow_dissector.c
tools/testing/selftests/bpf/progs/bpf_flow.c