Skip to content

bpf: Pull skb data into linear section for IPv6 NDP#43873

Merged
borkmann merged 1 commit intomainfrom
pr/l2ann-pull
Jan 19, 2026
Merged

bpf: Pull skb data into linear section for IPv6 NDP#43873
borkmann merged 1 commit intomainfrom
pr/l2ann-pull

Conversation

@borkmann
Copy link
Copy Markdown
Member

@borkmann borkmann commented Jan 19, 2026

(see commit desc)

Fixes: #43774

Fix BPF IPv6 neighbor discovery code to fully pull in skb data into linear section.

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>
@borkmann borkmann requested a review from msune January 19, 2026 14:24
@borkmann borkmann requested a review from a team as a code owner January 19, 2026 14:24
@borkmann borkmann added area/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 Jan 19, 2026
@borkmann borkmann requested a review from ldelossa January 19, 2026 14:24
@borkmann borkmann added the needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch label Jan 19, 2026
@borkmann
Copy link
Copy Markdown
Member Author

/test

@msune
Copy link
Copy Markdown
Member

msune commented Jan 19, 2026

BPF units ✔️

@borkmann
Copy link
Copy Markdown
Member Author

(reporter from #43774 also confirmed that this fixes the problem)

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 19, 2026
@borkmann borkmann merged commit f87ff38 into main Jan 19, 2026
380 of 381 checks passed
@borkmann borkmann deleted the pr/l2ann-pull branch January 19, 2026 15:53
@giorio94 giorio94 mentioned this pull request Jan 22, 2026
6 tasks
@giorio94 giorio94 added backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. and removed needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Jan 22, 2026
@github-actions github-actions bot added backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. and removed backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. labels Jan 22, 2026
@cilium-release-bot cilium-release-bot bot moved this to Released in cilium v1.19.0 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. 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.

Projects

No open projects
Status: Released

Development

Successfully merging this pull request may close these issues.

IPv6 L2 announcement not responding to NDP requests, SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST

4 participants