diff mbox series

[v2] selftest/bpf: fix IPV6FR handling in flow dissector

Message ID X7JUzUj34ceE2wBm@santucci.pierpaolo (mailing list archive)
State Accepted
Commit 024cd2cbd1ca2d29e6df538855d52c4e5990cab7
Delegated to: BPF
Headers show
Series [v2] selftest/bpf: fix IPV6FR handling in flow dissector | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Santucci Pierpaolo Nov. 16, 2020, 10:30 a.m. UTC
>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 <santucci@epigenesys.com>
---
v2: extend the commit message, as suggested by John Fastabend
    <john.fastabend@gmail.com>

 tools/testing/selftests/bpf/progs/bpf_flow.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jakub Sitnicki Nov. 16, 2020, 12:18 p.m. UTC | #1
On Mon, Nov 16, 2020 at 11:30 AM CET, Santucci Pierpaolo wrote:
> 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 <santucci@epigenesys.com>
> ---
> v2: extend the commit message, as suggested by John Fastabend
>     <john.fastabend@gmail.com>
>
>  tools/testing/selftests/bpf/progs/bpf_flow.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/progs/bpf_flow.c b/tools/testing/selftests/bpf/progs/bpf_flow.c
> index 5a65f6b51377..95a5a0778ed7 100644
> --- a/tools/testing/selftests/bpf/progs/bpf_flow.c
> +++ b/tools/testing/selftests/bpf/progs/bpf_flow.c
> @@ -368,6 +368,8 @@ PROG(IPV6FR)(struct __sk_buff *skb)
>  		 */
>  		if (!(keys->flags & BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG))
>  			return export_flow_keys(keys, BPF_OK);
> +	} else {
> +		return export_flow_keys(keys, BPF_OK);
>  	}
>  
>  	return parse_ipv6_proto(skb, fragh->nexthdr);

Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
patchwork-bot+netdevbpf@kernel.org Nov. 16, 2020, 4:10 p.m. UTC | #2
Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

On Mon, 16 Nov 2020 11:30:37 +0100 you wrote:
> >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 <santucci@epigenesys.com>
> 
> [...]

Here is the summary with links:
  - [v2] selftest/bpf: fix IPV6FR handling in flow dissector
    https://git.kernel.org/bpf/bpf-next/c/024cd2cbd1ca

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/progs/bpf_flow.c b/tools/testing/selftests/bpf/progs/bpf_flow.c
index 5a65f6b51377..95a5a0778ed7 100644
--- a/tools/testing/selftests/bpf/progs/bpf_flow.c
+++ b/tools/testing/selftests/bpf/progs/bpf_flow.c
@@ -368,6 +368,8 @@  PROG(IPV6FR)(struct __sk_buff *skb)
 		 */
 		if (!(keys->flags & BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG))
 			return export_flow_keys(keys, BPF_OK);
+	} else {
+		return export_flow_keys(keys, BPF_OK);
 	}
 
 	return parse_ipv6_proto(skb, fragh->nexthdr);