diff options
Diffstat (limited to 'internal/pkg/table/table.go')
-rw-r--r-- | internal/pkg/table/table.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/pkg/table/table.go b/internal/pkg/table/table.go index c7e505cc..9a9bdd8b 100644 --- a/internal/pkg/table/table.go +++ b/internal/pkg/table/table.go @@ -17,6 +17,7 @@ package table import ( "fmt" + "math/bits" "net" "strings" "unsafe" @@ -118,6 +119,13 @@ func (t *Table) deleteRTCPathsByVrf(vrf *Vrf, vrfs map[string]*Vrf) []*Path { } func (t *Table) deleteDest(dest *Destination) { + count := 0 + for _, v := range dest.localIdMap.bitmap { + count += bits.OnesCount64(v) + } + if len(dest.localIdMap.bitmap) != 0 && count != 1 { + return + } destinations := t.GetDestinations() delete(destinations, t.tableKey(dest.GetNlri())) if len(destinations) == 0 { |