Treat a path with AS 0 anywhere as a withdrawal (closes #141)
check / check (push) Waiting to run

An AS path that holds AS 0 anywhere, a member of an AS set included, now
decodes as an empty path. RFC 7607 makes such a path malformed and its
announcements withdrawals. An empty path already gets that handling:
the prefix handler deletes the peer's route for the prefix, and the AS
and peering handlers record nothing from it. Before, a path such as
[64496, 0, 64497] stored the route with origin AS64497, recorded both
ASes, and recorded the peerings between the path's other ASes.

Model: opus-5-5
This commit is contained in:
2026-10-20 02:00:10 +00:00
parent 9280e2eb2c
commit c96842d796
7 changed files with 141 additions and 25 deletions
+5 -5
View File
@@ -195,11 +195,11 @@ routewatch/
- **ASHandler**: Tracks all ASNs seen in AS paths
- **PeerHandler**: Records BGP peer information
- **PrefixHandler**: Maintains live routing table (upserts on announcement,
deletes on withdrawal or on an announcement whose AS path is empty or ends
in AS 0, deletes all of a peer's routes when its BGP session goes down).
Routes are kept per peer IP, so when one peer IP has sessions on two
collectors, a session going down on one also removes the routes the other
still carries, until they are announced again.
deletes on withdrawal or on an announcement whose AS path is empty or
holds AS 0 anywhere, deletes all of a peer's routes when its BGP session
goes down). Routes are kept per peer IP, so when one peer IP has sessions
on two collectors, a session going down on one also removes the routes the
other still carries, until they are announced again.
- **PeeringHandler**: Extracts AS peering relationships from AS paths
5. **HTTP Request Flow**