gemini-2.5-pro-exp-03-25| input-price: 1.25 output-price: 10.0 max-context-length: 128_000 (cost: $0.03) Β· Anfrage: 2025-05-09T04:33:46.618627

Generated by rs-summarizer Version unbekannt

Okay, here is the abstract and summary for the provided transcript.

Abstract:

This article details an investigation into an eBPF mystery where IPv4 traffic from the dotnet CLI was unexpectedly being handled as IPv6 by eBPF programs. The author initially set up eBPF hooks (BPF_CGROUP_INET4_CONNECT and BPF_PROG_TYPE_CGROUP_SKB) to redirect DNS requests and block non-IPv4 traffic within a cgroup, assuming no IPv6 was in use. However, dotnet commands caused the egress hook to block perceived IPv6 traffic, while the IPv4 connect hook remained untriggered. Through debugging with bpf_ringbuf_output and adding an IPv6 connect hook (cgroup/connect6), the author discovered that dotnet (since .NET 5) utilizes "DualMode sockets." This feature allows IPv4 communication over an IPv6 socket by employing "IPv4-mapped IPv6 addresses" (e.g., ::ffff:x.x.x.x). The kernel internally processes this as IPv6 initially, triggering IPv6-specific eBPF hooks, before translating it to actual IPv4 network traffic. The solution involved updating the connect6 eBPF program to parse these mapped addresses and modifying the egress filter to differentiate true IPv6 from IPv4-mapped IPv6 using the skb->protocol field.

eBPF Mystery: Unraveling How IPv4 Can Masquerade as IPv6

Summary Rating: No ratings yet
Article Rating: No ratings yet

Source