An IP lookup can name the AS of a default or near-default route as the owner of an address.
Where: GetIPInfoContext in internal/database/database.go: the lookup tries every mask length down to /0, so any covering route counts, however short.
Seen on the live feed (image built from next at 00e51d2, two minutes after start): one RIS peer announces 2000::/3 with origin AS24785. Until a more specific route for an address has been seen, GET /api/v1/ip/2001:4860:4860::8888 and GET /api/v1/ip/2606:4700:4700::1111 both answered AS24785 ("Broadband Hosting B.V."), not AS15169 and AS13335. The table only learns a route when a peer sends an update for it, so for a stable prefix this can last for hours. A peer that sends 0.0.0.0/0 or ::/0 does the same for every address.
A default route or a route this short only says where a peer sends traffic it has no better route for; it does not say who holds the address.
Severity: medium
Definition of done
The IP lookup (/api/v1/ip/... and /ip/...) ignores routes shorter than a minimum mask length, named constants: /8 for IPv4 and /16 for IPv6. An address covered only by shorter routes gets the existing "no route found" answer. The live tables keep storing such routes; only the lookup skips them.
A test that fails before the fix: with only 2000::/3 and 0.0.0.0/0 in the table, lookups of an IPv6 and an IPv4 address find no route; with a /32 added, the IPv6 lookup finds it.
README, where it describes the IP lookup, says in one line that routes shorter than those lengths are not used.
make check passes.
Model: opus-5-5
An IP lookup can name the AS of a default or near-default route as the owner of an address.
Where: `GetIPInfoContext` in `internal/database/database.go`: the lookup tries every mask length down to `/0`, so any covering route counts, however short.
Seen on the live feed (image built from `next` at `00e51d2`, two minutes after start): one RIS peer announces `2000::/3` with origin AS24785. Until a more specific route for an address has been seen, `GET /api/v1/ip/2001:4860:4860::8888` and `GET /api/v1/ip/2606:4700:4700::1111` both answered AS24785 ("Broadband Hosting B.V."), not AS15169 and AS13335. The table only learns a route when a peer sends an update for it, so for a stable prefix this can last for hours. A peer that sends `0.0.0.0/0` or `::/0` does the same for every address.
A default route or a route this short only says where a peer sends traffic it has no better route for; it does not say who holds the address.
Severity: medium
## Definition of done
- The IP lookup (`/api/v1/ip/...` and `/ip/...`) ignores routes shorter than a minimum mask length, named constants: `/8` for IPv4 and `/16` for IPv6. An address covered only by shorter routes gets the existing "no route found" answer. The live tables keep storing such routes; only the lookup skips them.
- A test that fails before the fix: with only `2000::/3` and `0.0.0.0/0` in the table, lookups of an IPv6 and an IPv4 address find no route; with a `/32` added, the IPv6 lookup finds it.
- README, where it describes the IP lookup, says in one line that routes shorter than those lengths are not used.
- `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 14:35:04 +02:00
Implemented in #59: the IP lookup now stops at /8 for IPv4 and /16 for IPv6, so an address covered only by shorter routes gets "no route found"; those routes are still stored.
Model: opus-5-5
Implemented in https://git.eeqj.de/sneak/routewatch/pulls/59: the IP lookup now stops at /8 for IPv4 and /16 for IPv6, so an address covered only by shorter routes gets "no route found"; those routes are still stored.
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 IP lookup can name the AS of a default or near-default route as the owner of an address.
Where:
GetIPInfoContextininternal/database/database.go: the lookup tries every mask length down to/0, so any covering route counts, however short.Seen on the live feed (image built from
nextat00e51d2, two minutes after start): one RIS peer announces2000::/3with origin AS24785. Until a more specific route for an address has been seen,GET /api/v1/ip/2001:4860:4860::8888andGET /api/v1/ip/2606:4700:4700::1111both answered AS24785 ("Broadband Hosting B.V."), not AS15169 and AS13335. The table only learns a route when a peer sends an update for it, so for a stable prefix this can last for hours. A peer that sends0.0.0.0/0or::/0does the same for every address.A default route or a route this short only says where a peer sends traffic it has no better route for; it does not say who holds the address.
Severity: medium
Definition of done
/api/v1/ip/...and/ip/...) ignores routes shorter than a minimum mask length, named constants:/8for IPv4 and/16for IPv6. An address covered only by shorter routes gets the existing "no route found" answer. The live tables keep storing such routes; only the lookup skips them.2000::/3and0.0.0.0/0in the table, lookups of an IPv6 and an IPv4 address find no route; with a/32added, the IPv6 lookup finds it.make checkpasses.Model: opus-5-5
Implemented in #59: the IP lookup now stops at /8 for IPv4 and /16 for IPv6, so an address covered only by shorter routes gets "no route found"; those routes are still stored.
Model: opus-5-5