Skip to content

Compile libpcap with --disable-protochain#558

Merged
brb merged 1 commit intocilium:mainfrom
jschwinger233:gray/disable-protochain
May 26, 2025
Merged

Compile libpcap with --disable-protochain#558
brb merged 1 commit intocilium:mainfrom
jschwinger233:gray/disable-protochain

Conversation

@jschwinger233
Copy link
Member

@jschwinger233 jschwinger233 commented May 23, 2025

There is a known issue that cloudfare/cbpfc can't properly handle "jump back" cBPF: cloudflare/cbpfc#37. Unfortunately, "protochain" pcap filter often generates such "jump back" instructions, leading to errors like:

unable to compute blocks: instruction 18: ja 4294967281 flows past last instruction

This patch disables protochain when compiling libpcap, so users receive a clearer error:

$ pwru ip6 protochain 58
2025/05/23 22:42:53 Failed to inject filter ebpf for kprobe_multi_skb_5: failed to pcap_compile 'ip6 protochain 58': protochain not supported (l3=false)

Issue: #549

@jschwinger233 jschwinger233 requested a review from a team as a code owner May 23, 2025 14:52
@jschwinger233 jschwinger233 requested review from brb and removed request for a team May 23, 2025 14:52
@jschwinger233 jschwinger233 force-pushed the gray/disable-protochain branch from e32edb3 to 2fe6b0b Compare May 23, 2025 14:53
There is a known issue that cloudfare/cbpfc can't properly handle "jump
back" cBPF: cloudflare/cbpfc#36. Unfortunately,
"protochain" pcap filter often generates such "jump back" instructions,
leading to errors like:

    unable to compute blocks: instruction 18: ja 4294967281 flows past last instruction

This patch disables protochain when compiling libpcap, so users receive a
clearer error:

    $ pwru ip6 protochain 58
    2025/05/23 22:42:53 Failed to inject filter ebpf for kprobe_multi_skb_5: failed to pcap_compile 'ip6 protochain 58': protochain not supported (l3=false)

Signed-off-by: gray <greyschwinger@gmail.com>
@jschwinger233 jschwinger233 force-pushed the gray/disable-protochain branch from 2fe6b0b to 6a9eb61 Compare May 25, 2025 06:46
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@brb brb merged commit aed8306 into cilium:main May 26, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants