feat(network): BPF ingress/egress filtering#1055
Closed
Zenithar wants to merge 5 commits intoDataDog:mainfrom
Closed
feat(network): BPF ingress/egress filtering#1055Zenithar wants to merge 5 commits intoDataDog:mainfrom
Zenithar wants to merge 5 commits intoDataDog:mainfrom
Conversation
05925b2 to
aacb677
Compare
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.
What does this PR do?
Replaces the legacy iptables/u32-based network disruption packet filtering with a full eBPF (TC classifier) implementation for both ingress and egress traffic paths.
Key changes
bpfdisruptpackage —Enginethat manages the BPF data plane: clsact qdisc lifecycle, IFB device for ingress redirect, BPF program attachment (TC egress classifier + ingress DirectAction), and LPM trie map population for target CIDR matching.ebpf/network-disruption/disruption.bpf.c) — TC classifier that matches packets against an LPM trie of disruption rules (CIDR + port + protocol), supporting both IPv4 and IPv6.ebpf/network-disruption/main.go) — Userspace helper that pins and populates the LPM trie maps via libbpfgo.injector/network_disruption.go— Integrates the BPF engine, replacing iptables/u32 filter chains with BPF classifiers. Simplifies the overall tc qdisc/filter setup.network/abstractions —TrafficControllerandNetlinkAdapterinterfaces for tc and netlink operations, with mocks for testability.bpfdisrupt.Engine, network disruption helpers, and controller-level BPF network disruption integration tests.Code Quality Checklist
Testing
unittests orend-to-endtests.