Keep a trailing AS set out of the origin and the peerings (closes #75)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
A path that ends in an AS set of several members, such as [64496, 64497, [64498, 64499]], now has no origin: its route is stored with origin 0 (none), and no member of the set is in a peering. A set of one member counts as that AS. An announcement with an empty path is still not stored. ASPath keeps such a set apart from the sequence and gives the origin. The prefix and AS handlers take the origin from it; the peering handler uses the sequence only. The stored AS path still lists the set's members at the end. The prefix and prefix length pages show origin 0 as no known origin, the IP lookup asks no WHOIS lookup for it, and the README says what it means. Model: opus-5-5
This commit is contained in:
@@ -2141,11 +2141,12 @@ func (d *Database) GetIPInfoContext(
|
||||
info.FirstSeen = prefixFirstSeen.Time
|
||||
}
|
||||
|
||||
// Check if WHOIS data needs refresh (never fetched or older than 30 days)
|
||||
// Check if WHOIS data needs refresh (never fetched or older than 30 days).
|
||||
// A route with origin 0 has no known origin, so no AS to look up.
|
||||
const staleThreshold = 30 * 24 * time.Hour
|
||||
|
||||
info.NeedsWHOISRefresh = !whoisUpdatedAt.Valid ||
|
||||
time.Since(whoisUpdatedAt.Time) > staleThreshold
|
||||
info.NeedsWHOISRefresh = info.ASN != 0 && (!whoisUpdatedAt.Valid ||
|
||||
time.Since(whoisUpdatedAt.Time) > staleThreshold)
|
||||
|
||||
return info, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user