bpf: Correct refinement of inner packet L4 checksum detection#43868
bpf: Correct refinement of inner packet L4 checksum detection#43868julianwiedmann merged 1 commit intocilium:mainfrom
Conversation
|
@yushoyamaguchi @pchaigno |
ff1dc74 to
4450925
Compare
e543e6e to
0a22318
Compare
The previous commit updating short ICMP error packet NAT handling improperly computed the length of a short packet by neglecting to account for the ihl field of the IP header representing 32 bit words rather than bytes. This caused a reversion of cilium#33844. Furthermore, the change in short packet detection depends on the incoming bpf_context structure having the "len" field set correctly, which the BPF tests for that condition did not set. This corrects the comparison for the inner L4 packet length and updates the short ICMP error packet BPF tests to ensure the ctx->len field is set like the kernel does. Fixes: cilium@1a018d56d623 ("bpf: Refine inner packet L4 checksum detection") Signed-off-by: Bill Reese <ReeseW@computer.org>
0a22318 to
4b20127
Compare
|
/test |
smagnani96
left a comment
There was a problem hiding this comment.
LGTM, thanks!
@julianwiedmann I added labels, feel free to make any needed adjustment.
I see the original PR has been backported to v1.18, so we need this in v1.18 and v1.19 too.
|
Thank you! |
|
We're still missing a release note here. |
I thought PR title was enough, but maybe not too representative. @br4243 Refer to the Development Doc. We usually include that at the end of the PR description, which will be used when generating release notes. I gave it a shot (changed PR description), please double check and adjust accordingly if needed. |
It's too generic. We'd need something that tells users exactly who's concerned and what the impact is. One way to achieve that is to follow the pattern |
|
Thank you for the pointers on the release notes; I'll be sure to include that next time! |
|
@br4243 |
The previous commit updating short ICMP error packet NAT handling improperly computed the length of a short packet by neglecting to account for the ihl field of the IP header representing 32 bit words rather than bytes. This caused a reversion of #33844.
Furthermore, the change in short packet detection depends on the incoming bpf_context structure having the "len" field set correctly, which the BPF tests for that condition did not set.
This corrects the comparison for the inner L4 packet length and updates the short ICMP error packet BPF tests to ensure the ctx->len field is set like the kernel does.
Fixes: 1a018d56d623 ("bpf: Refine inner packet L4 checksum detection")