osrg/gobgp

GoBGP doesn't report number of destinations in ADJ-IN correctly

atashbahar opened this issue · 0 comments

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?