From 80206b5323db0f9d966ec6e13fd3154a2c70e3e6 Mon Sep 17 00:00:00 2001 From: James Tucker Date: Wed, 27 Sep 2023 13:32:08 -0700 Subject: [PATCH] wgengine/magicsock: add nodeid to panic condition on public key reuse If the condition arises, it should be easy to track down. Updates #9547 Signed-off-by: James Tucker --- wgengine/magicsock/magicsock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index cdb793e39..016061c21 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -1893,7 +1893,7 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) { // that differs from the one the NodeID had. But double check. if ep.nodeID != n.ID() { // Server error. - devPanicf("public key moved between nodeIDs") + devPanicf("public key moved between nodeIDs (old=%v new=%v, key=%s)", ep.nodeID, n.ID(), n.Key().String()) } else { // Internal data structures out of sync. devPanicf("public key found in peerMap but not by nodeID")