Skip to content

Commit 024cd2c

Browse files
Santucci Pierpaoloborkmann
Santucci Pierpaolo
authored andcommitted
selftest/bpf: Fix IPV6FR handling in flow dissector
From second fragment on, IPV6FR program must stop the dissection of IPV6 fragmented packet. This is the same approach used for IPV4 fragmentation. This fixes the flow keys calculation for the upper-layer protocols. Note that according to RFC8200, the first fragment packet must include the upper-layer header. Signed-off-by: Santucci Pierpaolo <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Jakub Sitnicki <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 2d38c58 commit 024cd2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/bpf/progs/bpf_flow.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ PROG(IPV6FR)(struct __sk_buff *skb)
368368
*/
369369
if (!(keys->flags & BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG))
370370
return export_flow_keys(keys, BPF_OK);
371+
} else {
372+
return export_flow_keys(keys, BPF_OK);
371373
}
372374

373375
return parse_ipv6_proto(skb, fragh->nexthdr);

0 commit comments

Comments
 (0)