bpf: Pull skb data into linear section for IPv6 NDP#43873
Merged
Conversation
In IPv4 code, we pull the ARP header into the linear section of the skb:
[...]
case bpf_htons(ETH_P_ARP):
if (is_defined(ENABLE_ARP_PASSTHROUGH) ||
is_defined(ENABLE_ARP_RESPONDER) ||
CONFIG(enable_l2_announcements)) {
if (!revalidate_data_arp_pull(ctx, &data, &data_end, &arp)) {
ret = DROP_INVALID;
goto drop_err_ingress;
}
[...]
if (CONFIG(enable_l2_announcements)) {
ret = handle_l2_announcement(ctx, NULL);
[...]
This is however not the case in IPv6, and so a NIC driver which does not
pull in anything the handle_l2_announcement() could fail given only the
Ethernet + IPv6 header is in the linear section. Then we return with
CTX_ACT_OK and the packet goes up the stack. Given this is slow-path, pull
in skb->len. For XDP its a no-op.
Related: #43774
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Co-developed-by: Marc Suñé <marc.sune@isovalent.com>
Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
Member
Author
|
/test |
Closed
3 tasks
Member
|
BPF units ✔️ |
msune
approved these changes
Jan 19, 2026
Member
Author
|
(reporter from #43774 also confirmed that this fixes the problem) |
ldelossa
approved these changes
Jan 19, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(see commit desc)
Fixes: #43774