Phase 1 of the BGP teaching demo: the daemon can now originate routes and
advertise them to every established peer.
- rib: add LocalRib actor holding locally originated routes with owner,
origin, AS-path prepend, MED, standard and large communities. Enforces a
LocalRibPolicy (prefix allowlist, per-owner limit, owner match on
replace/withdraw) and emits LocalRibEvents.
- server: add SessionRegistry with per-session outbound queues; sessions
register on Established and deregister via a drop guard. Emits
SessionEvent::{Up,Down}.
- server: advertiser task fans LocalRib changes out to all sessions and
replays the table to new sessions. UPDATE builders handle IPv4 (legacy
NLRI) and IPv6 (MP_REACH/MP_UNREACH).
- fsm: merge the timer and timer-less established loops into one select!
with an outbound branch; reset the hold timer on any received message
per RFC 4271 §8.2.2 (previously only on KEEPALIVE).
- config: new local_route_policy proto message.
- packet: fix Communitites typo, expose CommunitiesPathAttribute inner vec.
- primitives: IpPrefix::contains.
- integration tests: announce/withdraw/replay/fan-out/policy coverage.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
16 lines
286 B
Protocol Buffer Text Format
16 lines
286 B
Protocol Buffer Text Format
router_id: "10.0.0.1"
|
|
local_asn: 65000
|
|
listen_endpoints {
|
|
address: "127.0.0.1"
|
|
port: 179
|
|
}
|
|
listen_endpoints {
|
|
address: "[::1]"
|
|
port: 179
|
|
}
|
|
local_route_policy {
|
|
allowed_prefixes: "10.100.0.0/16"
|
|
allowed_prefixes: "2001:db8:100::/48"
|
|
max_routes_per_owner: 4
|
|
}
|