mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-01 21:21:04 +00:00
wgengine/magicsock: remove redundant/wrong sharedDiscoKey delete
The pass just after in this method handles cleaning up sharedDiscoKey. No need to do it wrong (assuming DiscoKey => 1 node) earlier. Updates #3088 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> (cherry picked from commit 36a07089ee6a49a7a178db486c9716de1e77201a)
This commit is contained in:
parent
e921482548
commit
093ae70293
@ -2179,9 +2179,6 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
|
|||||||
c.peerMap.forEachDiscoEndpoint(func(ep *endpoint) {
|
c.peerMap.forEachDiscoEndpoint(func(ep *endpoint) {
|
||||||
if !keep[ep.publicKey] {
|
if !keep[ep.publicKey] {
|
||||||
c.peerMap.deleteDiscoEndpoint(ep)
|
c.peerMap.deleteDiscoEndpoint(ep)
|
||||||
if !ep.discoKey.IsZero() {
|
|
||||||
delete(c.sharedDiscoKey, ep.discoKey)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user