fix(blackwalld): don't block arming on placeholder RTBH next-hop when a community is set (#273) #274
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!274
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rtbh-placeholder-nexthop-273"
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?
Closes #273.
The arm-time placeholder-next-hop check (
68eb669, 2026-07-31) predates the community→RTD_BLACKHOLEimport fix (c49e31b, 2026-08-01) by 12 commits and still encodes the pre-fix assumption — that a resolvable next-hop is required for BIRD to produce a real blackhole. Sincec49e31b, blackwall's generated BIRD import filter converts an RFC 7999 community-tagged host route directly todest = RTD_BLACKHOLE, so the next-hop need not resolve at all. Deploying the #265/#266/#270 binary to the live AS214806 container (config unchanged,next-hop-v4=192.0.2.1 next-hop-v6=100::1— deliberately placeholder becausec49e31bmade a real discard unnecessary) tripped the stale check and downgraded it from ARMED (M1) to a shadow crash-loop.Fix
Replace the unconditional hard error with
RtbhPolicy::next_hop_verdict():[(65535,666)])With a community set, the community path makes the next-hop irrelevant — but blackwalld can't see the router's config to confirm the import filter is in place, so it warns (naming
blackwalld bird-config/c49e31b) rather than blocks. With no community, next-hop resolution is the only mechanism and a placeholder is still a hard block.The live workaround (real-but-unused
.67next-hops) becomes unnecessary after this — a placeholder next-hop arms with a warning.Tests
next_hop_verdictis a pure method with a unit test inblackwall-corecovering all three verdicts (community/no-community × placeholder/real).facea8c12cf0b3ccf1c7