diff options
Diffstat (limited to 'table/table.go')
-rw-r--r-- | table/table.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/table/table.go b/table/table.go index 6bc88149..35403a23 100644 --- a/table/table.go +++ b/table/table.go @@ -200,7 +200,7 @@ func (t *Table) GetSortedDestinations() []*Destination { case bgp.RF_IPv4_UC, bgp.RF_IPv6_UC: r := radix.New() for _, dst := range t.GetDestinations() { - r.Insert(dst.RadixKey, dst) + r.Insert(AddrToRadixkey(dst.nlri), dst) } r.Walk(func(s string, v interface{}) bool { results = append(results, v.(*Destination)) @@ -241,7 +241,7 @@ func (t *Table) GetLongerPrefixDestinations(key string) ([]*Destination, error) k := CidrToRadixkey(prefix.String()) r := radix.New() for _, dst := range t.GetDestinations() { - r.Insert(dst.RadixKey, dst) + r.Insert(AddrToRadixkey(dst.nlri), dst) } r.WalkPrefix(k, func(s string, v interface{}) bool { results = append(results, v.(*Destination)) |