mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-25 07:11:36 +00:00
fix some issues with the rewritten switch lookup tables
This commit is contained in:
parent
f9bc0b7aee
commit
905c28f7b2
@ -444,6 +444,9 @@ func (t *switchTable) _handleMsg(msg *switchMsg, fromPort switchPort, reprocessi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if sender.blocked != oldSender.blocked {
|
||||||
|
doUpdate = true
|
||||||
|
}
|
||||||
// Update sender
|
// Update sender
|
||||||
t.data.peers[fromPort] = sender
|
t.data.peers[fromPort] = sender
|
||||||
// Decide if we should also update our root info to make the sender our parent
|
// Decide if we should also update our root info to make the sender our parent
|
||||||
@ -543,7 +546,9 @@ func (t *switchTable) _updateTable() {
|
|||||||
}
|
}
|
||||||
newTable._init()
|
newTable._init()
|
||||||
for _, pinfo := range t.data.peers {
|
for _, pinfo := range t.data.peers {
|
||||||
if pinfo.locator.root != newTable.self.root {
|
if pinfo.blocked ||
|
||||||
|
pinfo.locator.root != newTable.self.root ||
|
||||||
|
pinfo.key == t.key {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
loc := pinfo.locator.clone()
|
loc := pinfo.locator.clone()
|
||||||
|
Loading…
Reference in New Issue
Block a user