feat(bgp): generate the BIRD iBGP config from blackwall's own config #188
No reviewers
Labels
No labels
bug
deploy
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/blackwall!188
Loading…
Reference in a new issue
No description provided.
Delete branch "sp-bird-gen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Deployment backlog #3 (issue #172, milestone M0): generate the BIRD-side config for the blackwall↔BIRD iBGP session from blackwall's own config, so prefix lists and session params aren't hand-maintained in both
blackwall.confandbird.conf.Blackwall already runs a native injection-only iBGP speaker that peers with BIRD 2.x; this emits the reciprocal BIRD config as an
includefile — the operator addsinclude "blackwall.conf";to bird.conf. It's orthogonal to the hand-maintained upstream/IX sessions (blackwall injects once, BIRD fans out).Changes
render_bird_ibgp(policy) -> Result<String, BirdGenError>(blackwall-bgp, pure + byte-exact tested): emitsOWN_V4/V6defines + one MP-BGPprotocol bgp blackwallsession (ipv4/ipv6/flow4/flow6 channels). Unicast import filters usenet ~ [prefix+]; flow filters usenet.dst ~ [prefix+](the correct BIRD2 form). MD5 →include "blackwall-secret.conf";(secret never in the output — the generated include is non-sensitive/GitOps-safe); GTSM →ttl security on;.rtbh local-addr=→RtbhPolicy.local_addr(blackwall's BGP source), emitted as BIRD'sneighborAND bound by the speaker as its source — so the two sides match by construction.blackwalld bird-config --config <cfg>prints the include.bird -pparse-check gate + a netnsbird-gen.kdllab gate that establishes the session and imports both a blackhole and a FlowSpec rule through the generated filters.Multiple upstreams preserved
This only generates the blackwall↔BIRD glue + OWN defines. BIRD keeps all its hand-maintained upstream/IX sessions; blackwall injects once and BIRD re-advertises to every upstream via the existing per-peer export filters.
Quality
Subagent-driven: 5 tasks each spec+quality reviewed + a final opus whole-branch review (ready to merge). The Task 5 real-BIRD validation earned its keep — it caught two renderer bugs the byte-exact unit tests had codified as correct (a local/neighbor swap and a
net→net.dstflow-filter bug that would have silently dropped every FlowSpec rule in production); both fixed and now proven live. clippy--workspace --all-targets --deny warningsclean; fmt clean; coverage 95.38%. Noascasts.