* [PATCH] ipv6: record frag_max_size in atomic fragments in input path
@ 2021-05-21 20:21 Francesco Ruggeri
2021-05-21 22:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Francesco Ruggeri @ 2021-05-21 20:21 UTC (permalink / raw)
To: davem, linux-kernel, netdev, edumazet, willemb, kuba, dsahern,
yoshfuji, fruggeri
Commit dbd1759e6a9c ("ipv6: on reassembly, record frag_max_size")
filled the frag_max_size field in IP6CB in the input path.
The field should also be filled in case of atomic fragments.
Fixes: dbd1759e6a9c ('ipv6: on reassembly, record frag_max_size')
Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
---
net/ipv6/reassembly.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 47a0dc46cbdb..28e44782c94d 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -343,7 +343,7 @@ static int ipv6_frag_rcv(struct sk_buff *skb)
hdr = ipv6_hdr(skb);
fhdr = (struct frag_hdr *)skb_transport_header(skb);
- if (!(fhdr->frag_off & htons(0xFFF9))) {
+ if (!(fhdr->frag_off & htons(IP6_OFFSET | IP6_MF))) {
/* It is not a fragmented frame */
skb->transport_header += sizeof(struct frag_hdr);
__IP6_INC_STATS(net,
@@ -351,6 +351,8 @@ static int ipv6_frag_rcv(struct sk_buff *skb)
IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb);
IP6CB(skb)->flags |= IP6SKB_FRAGMENTED;
+ IP6CB(skb)->frag_max_size = ntohs(hdr->payload_len) +
+ sizeof(struct ipv6hdr);
return 1;
}
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv6: record frag_max_size in atomic fragments in input path
2021-05-21 20:21 [PATCH] ipv6: record frag_max_size in atomic fragments in input path Francesco Ruggeri
@ 2021-05-21 22:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-21 22:10 UTC (permalink / raw)
To: Francesco Ruggeri
Cc: davem, linux-kernel, netdev, edumazet, willemb, kuba, dsahern, yoshfuji
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 21 May 2021 13:21:14 -0700 you wrote:
> Commit dbd1759e6a9c ("ipv6: on reassembly, record frag_max_size")
> filled the frag_max_size field in IP6CB in the input path.
> The field should also be filled in case of atomic fragments.
>
> Fixes: dbd1759e6a9c ('ipv6: on reassembly, record frag_max_size')
> Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
>
> [...]
Here is the summary with links:
- ipv6: record frag_max_size in atomic fragments in input path
https://git.kernel.org/netdev/net/c/e29f011e8fc0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-21 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 20:21 [PATCH] ipv6: record frag_max_size in atomic fragments in input path Francesco Ruggeri
2021-05-21 22:10 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.