An announcement whose AS path is empty or ends in AS 0 now deletes the peer's route for the prefix, as a withdrawal does. A peer's new announcement for a prefix replaces its old route; when the new path gives nothing to store, the old route is replaced with none. Before, such an announcement was neither stored nor applied: the peer's old route stayed live with its old origin and path, and when it followed the peer's withdrawal of the prefix in the same batch, the withdrawal was lost, because a batch keeps only each peer's last update for a prefix.
The change is one branch in the batch flush: every update that is not a storable announcement goes to the deletions. A path ending in an AS set of several members is still stored, with origin 0.
Not shown by the diff: such an announcement still counts as an announcement in the metrics, which count what the feed sent, and its prefix is still recorded in the prefix tables, as a withdrawn prefix is.
Disclosures:
Extra file: README.md "Handler Details" names the new deletion case.
Not covered: a path with AS 0 before its last AS, such as [64496, 0, 64497], is still stored with origin 64497, although RFC 7607 treats any AS 0 in a path as a withdrawal; the issue names only the origin.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/routewatch/issues/113.
An announcement whose AS path is empty or ends in AS 0 now deletes the peer's route for the prefix, as a withdrawal does. A peer's new announcement for a prefix replaces its old route; when the new path gives nothing to store, the old route is replaced with none. Before, such an announcement was neither stored nor applied: the peer's old route stayed live with its old origin and path, and when it followed the peer's withdrawal of the prefix in the same batch, the withdrawal was lost, because a batch keeps only each peer's last update for a prefix.
The change is one branch in the batch flush: every update that is not a storable announcement goes to the deletions. A path ending in an AS set of several members is still stored, with origin 0.
Not shown by the diff: such an announcement still counts as an announcement in the metrics, which count what the feed sent, and its prefix is still recorded in the prefix tables, as a withdrawn prefix is.
Disclosures:
- Extra file: `README.md` "Handler Details" names the new deletion case.
- Not covered: a path with AS 0 before its last AS, such as `[64496, 0, 64497]`, is still stored with origin 64497, although RFC 7607 treats any AS 0 in a path as a withdrawal; the issue names only the origin.
Model: opus-5-5
internal/routewatch/prefixhandler.go, PrefixHandler.flushBatch: the deletion branch now also takes announcements whose AS path is empty or ends in AS 0, but its error for a prefix that does not parse still says "Failed to parse CIDR for withdrawal". An announcement of such a prefix with the path [64496, 0] is logged as a withdrawal the feed never sent. Acceptable: a message that is true for both kinds of update, such as "Failed to parse CIDR for route deletion", or one that logs the update's type.
Model: opus-5-5
1. `internal/routewatch/prefixhandler.go`, `PrefixHandler.flushBatch`: the deletion branch now also takes announcements whose AS path is empty or ends in AS 0, but its error for a prefix that does not parse still says "Failed to parse CIDR for withdrawal". An announcement of such a prefix with the path `[64496, 0]` is logged as a withdrawal the feed never sent. Acceptable: a message that is true for both kinds of update, such as "Failed to parse CIDR for route deletion", or one that logs the update's type.
Model: opus-5-5
An announcement whose AS path is empty or ends in AS 0 now deletes the
peer's route for the prefix, as a withdrawal does. Before, it was neither
stored nor applied: the peer's old route stayed live, and within one
batch it cancelled the peer's earlier withdrawal of the prefix.
Model: opus-5-5
The deletion branch in PrefixHandler.flushBatch now logs "Failed to parse CIDR for route deletion", which is true for both a withdrawal and an announcement without a usable origin.
Model: opus-5-5
1. The deletion branch in `PrefixHandler.flushBatch` now logs "Failed to parse CIDR for route deletion", which is true for both a withdrawal and an announcement without a usable origin.
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.
Fixes #113.
An announcement whose AS path is empty or ends in AS 0 now deletes the peer's route for the prefix, as a withdrawal does. A peer's new announcement for a prefix replaces its old route; when the new path gives nothing to store, the old route is replaced with none. Before, such an announcement was neither stored nor applied: the peer's old route stayed live with its old origin and path, and when it followed the peer's withdrawal of the prefix in the same batch, the withdrawal was lost, because a batch keeps only each peer's last update for a prefix.
The change is one branch in the batch flush: every update that is not a storable announcement goes to the deletions. A path ending in an AS set of several members is still stored, with origin 0.
Not shown by the diff: such an announcement still counts as an announcement in the metrics, which count what the feed sent, and its prefix is still recorded in the prefix tables, as a withdrawn prefix is.
Disclosures:
README.md"Handler Details" names the new deletion case.[64496, 0, 64497], is still stored with origin 64497, although RFC 7607 treats any AS 0 in a path as a withdrawal; the issue names only the origin.Model: opus-5-5
internal/routewatch/prefixhandler.go,PrefixHandler.flushBatch: the deletion branch now also takes announcements whose AS path is empty or ends in AS 0, but its error for a prefix that does not parse still says "Failed to parse CIDR for withdrawal". An announcement of such a prefix with the path[64496, 0]is logged as a withdrawal the feed never sent. Acceptable: a message that is true for both kinds of update, such as "Failed to parse CIDR for route deletion", or one that logs the update's type.Model: opus-5-5
dfca772035toe02267a659PrefixHandler.flushBatchnow logs "Failed to parse CIDR for route deletion", which is true for both a withdrawal and an announcement without a usable origin.Model: opus-5-5
Review passed.
Model: opus-5-5