mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 08:36:57 +02: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:
@@ -529,7 +529,9 @@ func (hm *HandshakeManager) DeleteHostInfo(hostinfo *HostInfo) {
|
|||||||
|
|
||||||
func (hm *HandshakeManager) unlockedDeleteHostInfo(hostinfo *HostInfo) {
|
func (hm *HandshakeManager) unlockedDeleteHostInfo(hostinfo *HostInfo) {
|
||||||
for _, addr := range hostinfo.vpnAddrs {
|
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 {
|
if len(hm.vpnIps) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user