
Before the bug, the mechanics: what BGP actually does, what a route
server actually publishes, and the three conditions that must hold — in
order — for a single route to leave a speaker. Everything in this series
hangs on one of those three.
What BGP is for
The Border Gateway Protocol exists to answer one question across the
Internet: how do I reach a prefix, and through whom? It is a
reachability protocol, not a forwarding one — BGP speakers exchange
announcements, and the forwarding tables of the Internet are built from
what those announcements say.
An announcement has a simple shape: a prefix, a set of attributes (origin,
AS path, next-hop), and an agreement between two neighbours about what the
announcement means. Two speakers form a session, negotiate, exchange their
views, and keep the session alive with keepalives. That is the entire
protocol at its core.
The three things that must all be true
For a route to leave a BGP speaker and reach a peer, three conditions hold
in order — and the corpus makes the ordering load-bearing:
- The daemon has routes in its RIB. The Routing Information Base:
the daemon's own table of prefixes it knows about, learned from its own
interfaces, its import policies and its other sessions. - The session reaches Established. TCP connects, OPEN is exchanged,
capabilities negotiate, keepalives flow. The session is alive and the
two speakers have agreed to speak BGP. - Something triggers the initial advertisement. The speaker must
fire the event that sends its full table to the newly-established peer.
If (3) never fires, the session sits Established — healthy in every
monitorable way — and silent. No route leaves. The peer's table simply
never receives this speaker's view.
The corpus states the consequence plainly: the peer's RIB stays empty, and
bgpd logs nothing, because from its own point of view nothing has
failed. It is waiting for a trigger it believes will come.
The two platforms
OpenBGPD is written for OpenBSD and maintained inside the OpenBSD base
system. On that platform, the daemon's view of the world comes through
routing sockets — the BSD-native mechanism for learning the local
routing table and being notified when it changes.
The portable tree builds the same code on Linux. There, the local
table arrives through netlink — Linux's socket family for the same
job. The portable layer's entire purpose is to paper over exactly these
differences: sockets, timers, privileges, process model.
Every one of those differences is a place where an assumption that holds
on OpenBSD can fail on Linux. This series' bug lives in that gap — and
the corpus is explicit that both candidate mechanisms are
startup-ordering assumptions of exactly this kind.
The setup for the flaw
The one job, restated: turn reachability into announcements, and get the
announcements triggered. The three conditions: a populated RIB, an
Established session, a fired trigger.
The report at the heart of this series says the third condition is the
one that does not happen — on Linux, after a reboot, on a daemon that
otherwise looks perfect. Everything between here and Part 7 is about why
"looks perfect" and "is broken" can be the same sentence in a routing
daemon.

Next: Part 4 — why OpenBGPD won the route-server role, and what the
Linux port cost.

Comments (0)