An AS path that holds AS 0 anywhere, a member of an AS set included, now decodes as an empty path (ASPath.UnmarshalJSON in internal/ristypes/ris.go). RFC 7607 makes such a path malformed and its announcements withdrawals.
The check sits in the decoder because all three handlers already handle an empty path the right way: the prefix handler deletes the peer's route for the prefix (the rule from #113), the AS handler has no AS to record, and the peering handler needs at least two. No handler code changes; the prefix handler's comments and the README now say "holds AS 0 anywhere" where they said "ends in AS 0". The decoding moved into decodeASPath so that the check runs once, after both the plain and the AS-set decoding.
What the diff does not show: a message built in Go rather than decoded (only tests do that) keeps AS 0 in its path. The existing prefix handler test that builds a path ending in AS 0 by hand still passes, because such a path gives no origin.
Disclosures:
The issue says the peering handler records peerings with AS 0; it already skipped those pairs, but recorded the other neighbours in such a path, so its test also uses a path with AS 0 after two ASes.
README.md changed (one sentence), outside the expected file list.
Model: opus-5-5
An AS path that holds AS 0 anywhere, a member of an AS set included, now decodes as an empty path (`ASPath.UnmarshalJSON` in `internal/ristypes/ris.go`). RFC 7607 makes such a path malformed and its announcements withdrawals.
The check sits in the decoder because all three handlers already handle an empty path the right way: the prefix handler deletes the peer's route for the prefix (the rule from https://git.eeqj.de/sneak/routewatch/issues/113), the AS handler has no AS to record, and the peering handler needs at least two. No handler code changes; the prefix handler's comments and the README now say "holds AS 0 anywhere" where they said "ends in AS 0". The decoding moved into `decodeASPath` so that the check runs once, after both the plain and the AS-set decoding.
What the diff does not show: a message built in Go rather than decoded (only tests do that) keeps AS 0 in its path. The existing prefix handler test that builds a path ending in AS 0 by hand still passes, because such a path gives no origin.
Disclosures:
- The issue says the peering handler records peerings with AS 0; it already skipped those pairs, but recorded the other neighbours in such a path, so its test also uses a path with AS 0 after two ASes.
- `README.md` changed (one sentence), outside the expected file list.
Model: opus-5-5
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
An AS path that holds AS 0 anywhere, a member of an AS set included, now decodes as an empty path (
ASPath.UnmarshalJSONininternal/ristypes/ris.go). RFC 7607 makes such a path malformed and its announcements withdrawals.The check sits in the decoder because all three handlers already handle an empty path the right way: the prefix handler deletes the peer's route for the prefix (the rule from #113), the AS handler has no AS to record, and the peering handler needs at least two. No handler code changes; the prefix handler's comments and the README now say "holds AS 0 anywhere" where they said "ends in AS 0". The decoding moved into
decodeASPathso that the check runs once, after both the plain and the AS-set decoding.What the diff does not show: a message built in Go rather than decoded (only tests do that) keeps AS 0 in its path. The existing prefix handler test that builds a path ending in AS 0 by hand still passes, because such a path gives no origin.
Disclosures:
README.mdchanged (one sentence), outside the expected file list.Model: opus-5-5
Review passed.
Model: opus-5-5