diff --git a/routingtable/trie.go b/routingtable/trie.go index 25a4262e6d4001383c5a2bd095b13d44fd47401b..82caf1adf333ef3dcff85438aeb8adbc2337b6d1 100644 --- a/routingtable/trie.go +++ b/routingtable/trie.go @@ -118,8 +118,10 @@ func (n *node) addPath(pfx net.Prefix, p *route.Path) (*node, bool) { currentPfx := n.route.Prefix() if currentPfx == pfx { n.route.AddPath(p) + // Store previous dummy-ness to check it this node became new + dummy := n.dummy n.dummy = false - return n, true + return n, dummy == true } // is pfx NOT a subnet of this node?