mirror of https://github.com/slackhq/nebula.git
fix panic in handleInvalidCertificate (#675)
* fix panic in handleInvalidCertificate when HandleMonitorTick fires, the hostmap can be nil which causes a panic to occur when trying to clean up the hostmap in handleInvalidCertificate. This fix just stops the invalidation from continuing if the hostmap doesn't exist. * removed conditional for disconnectInvalid in HandleDeletionTick
This commit is contained in:
parent
45d1d2b6c6
commit
332fa2b825
|
@ -230,12 +230,9 @@ func (n *connectionManager) HandleDeletionTick(now time.Time) {
|
|||
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