Skip to content

Commit a86069c

Browse files
use new set function to prevent error in callback
1 parent b49aa38 commit a86069c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zrouting/routinglookup.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ func (t *RoutingLookupTree) PopulateFromMRTFiltered(raw io.Reader, pathFilter Pa
9292
if len(n.Path) > 0 {
9393
n.ASN = n.Path[len(n.Path)-1]
9494
}
95-
err := t.IPTree.AddByString(e.Prefix, n)
95+
// Set the node in the tree
96+
err := t.IPTree.SetByString(e.Prefix, n)
9697
if err != nil {
9798
return fmt.Errorf("could not add prefix %s to IP tree: %w", e.Prefix, err)
9899
}

0 commit comments

Comments
 (0)