diff options
Diffstat (limited to 'internal/pkg/table')
-rw-r--r-- | internal/pkg/table/table.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/pkg/table/table.go b/internal/pkg/table/table.go index 9a9bdd8b..f6ed2444 100644 --- a/internal/pkg/table/table.go +++ b/internal/pkg/table/table.go @@ -438,10 +438,15 @@ type TableInfo struct { func (t *Table) Info(id string, as uint32) *TableInfo { var numD, numP int for _, d := range t.destinations { - ps := d.GetKnownPathList(id, as) - if len(ps) > 0 { - numD += 1 - numP += len(ps) + n := 0 + if id == GLOBAL_RIB_NAME { + n = len(d.knownPathList) + } else { + n = len(d.GetKnownPathList(id, as)) + } + if n != 0 { + numD++ + numP += n } } return &TableInfo{ |