Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: fixes for IPv6 revNAT #24610

Merged
merged 3 commits into from Mar 29, 2023

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Mar 28, 2023

Fix some minor fallout from #18414.

ipv6_hdrlen_offset() can return an error, handle it.

Fixes: 156c30e ("bpf/nat: implement support of ICMP6 Error packet too big")
Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
When peaking into the inner packet, extract the .nexthdr type into the CT
tuple. This is what we later use in the switch-statement to handle the
inner L4 protocol type.

If the inner packet contains IPv6 extension headers, we would currently
misidentify the first extension type as L4 protocol type and return
DROP_INVALID.

Fixes: 156c30e ("bpf/nat: implement support of ICMP6 Error packet too big")
Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
When we don't recognize the inner L4 protocol type of an ICMPV6_PKT_TOOBIG
packet, return the appropriate drop reason.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added kind/bug This is a bug in the Cilium logic. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. labels Mar 28, 2023
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review March 29, 2023 07:03
@julianwiedmann julianwiedmann requested a review from a team as a code owner March 29, 2023 07:03
@julianwiedmann julianwiedmann changed the title 1.14 rev nat fixes bpf: fixes for IPv6 revNAT Mar 29, 2023
@julianwiedmann
Copy link
Member Author

@julianwiedmann julianwiedmann added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 29, 2023
@julianwiedmann julianwiedmann merged commit c3907b9 into cilium:master Mar 29, 2023
43 checks passed
@julianwiedmann julianwiedmann deleted the 1.14-rev-nat-fixes branch March 29, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants