mirror of https://github.com/slackhq/nebula.git
fix connection manager check when disconnect_invalid set (#658)
This restores the hostMap.QueryVpnIP block to how it looked before #370 was merged. I'm not sure why the patch from #370 wanted to continue on if there was no match found in the hostmap, since there isn't anything to do at that point (the tunnel has already been closed). This was causing a crash because the handleInvalidCertificate check expects the hostinfo to be passed in (but it is nil since there was no hostinfo in the hostmap). Fixes: #657
This commit is contained in:
parent
d85e24f49f
commit
b38bd36766
|
@ -179,12 +179,9 @@ func (n *connectionManager) HandleMonitorTick(now time.Time, p, nb, out []byte)
|
|||
hostinfo, err := n.hostMap.QueryVpnIp(vpnIp)
|
||||
if err != nil {
|
||||
n.l.Debugf("Not found in hostmap: %s", vpnIp)
|
||||
|
||||
if !n.intf.disconnectInvalid {
|
||||
n.ClearIP(vpnIp)
|
||||
n.ClearPendingDeletion(vpnIp)
|
||||
continue
|
||||
}
|
||||
n.ClearIP(vpnIp)
|
||||
n.ClearPendingDeletion(vpnIp)
|
||||
continue
|
||||
}
|
||||
|
||||
if n.handleInvalidCertificate(now, vpnIp, hostinfo) {
|
||||
|
|
Loading…
Reference in New Issue