A peer has at most one route per prefix, but both live route tables were unique on prefix, origin AS and peer. A peer that changed a prefix's origin AS left its old route behind, and a withdrawal sent in the same message as announcements was given their origin AS and missed the withdrawn route. Both tables are now unique on prefix and peer. An announcement replaces the peer's row for the prefix, origin AS included; a withdrawal deletes it without looking at an origin AS. The route counts and prefix distribution kept in memory stay exact, for IPv4 and IPv6. Model: opus-5-5
This commit was merged in pull request #82.
This commit is contained in:
@@ -55,7 +55,7 @@ type Store interface {
|
||||
// Live route operations
|
||||
UpsertLiveRoute(route *LiveRoute) error
|
||||
UpsertLiveRouteBatch(routes []*LiveRoute) error
|
||||
DeleteLiveRoute(prefix string, originASN int, peerIP string) error
|
||||
DeleteLiveRoute(prefix, peerIP string) error
|
||||
DeleteLiveRouteBatch(deletions []LiveRouteDeletion) error
|
||||
GetPrefixDistribution() (ipv4 []PrefixDistribution, ipv6 []PrefixDistribution, err error)
|
||||
GetPrefixDistributionContext(ctx context.Context) (ipv4 []PrefixDistribution, ipv6 []PrefixDistribution, err error)
|
||||
|
||||
Reference in New Issue
Block a user