Skip to content
Snippets Groups Projects
Commit d68014e6 authored by Maximilian Wilhelm's avatar Maximilian Wilhelm
Browse files

Check if trie node previously was a dummy when deciding if it's new.

parent eeaf11c8
No related branches found
No related tags found
No related merge requests found
...@@ -118,8 +118,10 @@ func (n *node) addPath(pfx net.Prefix, p *route.Path) (*node, bool) { ...@@ -118,8 +118,10 @@ func (n *node) addPath(pfx net.Prefix, p *route.Path) (*node, bool) {
currentPfx := n.route.Prefix() currentPfx := n.route.Prefix()
if currentPfx == pfx { if currentPfx == pfx {
n.route.AddPath(p) n.route.AddPath(p)
// Store previous dummy-ness to check it this node became new
dummy := n.dummy
n.dummy = false n.dummy = false
return n, true return n, dummy == true
} }
// is pfx NOT a subnet of this node? // is pfx NOT a subnet of this node?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment