mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 10:46:52 +01:00
before removing a pending hostinfo in handshake_manager, make sure it's the one we wanted to delete (#1811)
This commit is contained in:
1 parent
3615a79b8b
commit
a99699e370
1 file changed
+3
-1
@@ -529,7 +529,9 @@ func (hm *HandshakeManager) DeleteHostInfo(hostinfo *HostInfo) {
|
||||
|
||||
func (hm *HandshakeManager) unlockedDeleteHostInfo(hostinfo *HostInfo) {
|
||||
for _, addr := range hostinfo.vpnAddrs {
|
||||
delete(hm.vpnIps, addr)
|
||||
if cur, ok := hm.vpnIps[addr]; ok && cur.hostinfo == hostinfo {
|
||||
delete(hm.vpnIps, addr)
|
||||
}
|
||||
}
|
||||
|
||||
if len(hm.vpnIps) == 0 {
|
||||
|
||||
Reference in new issue
Block a user