From 905c28f7b213ac2f6cdf471e4af1587e307ea32f Mon Sep 17 00:00:00 2001 From: Arceliar Date: Wed, 27 May 2020 19:31:17 -0500 Subject: [PATCH] fix some issues with the rewritten switch lookup tables --- src/yggdrasil/switch.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/yggdrasil/switch.go b/src/yggdrasil/switch.go index a3961c31..ae14d772 100644 --- a/src/yggdrasil/switch.go +++ b/src/yggdrasil/switch.go @@ -444,6 +444,9 @@ func (t *switchTable) _handleMsg(msg *switchMsg, fromPort switchPort, reprocessi } } } + if sender.blocked != oldSender.blocked { + doUpdate = true + } // Update sender t.data.peers[fromPort] = sender // 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() 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 } loc := pinfo.locator.clone()