gobgp
gobgp copied to clipboard
GoBGP doesn't report number of destinations in ADJ-IN correctly
When calling GetTable to get number of destinations and paths, both values are the same.
This is due to the fact that both are populated with the same value [ref]:
func (adj *AdjRib) TableInfo(family bgp.RouteFamily) (*TableInfo, error) {
if _, ok := adj.table[family]; !ok {
return nil, fmt.Errorf("%s unsupported", family)
}
c := adj.Count([]bgp.RouteFamily{family})
a := adj.Accepted([]bgp.RouteFamily{family})
return &TableInfo{
NumDestination: c,
NumPath: c,
NumAccepted: a,
}, nil
}
Is this expected behavior or a bug?
Seems logical to me, since one peer cannot produce more than one path per destination. In GRT, though, since it is combined view of all peers it's not true - there are more paths than destinations.