mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-09 04:53:57 +01:00
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)
|
hostinfo, err := n.hostMap.QueryVpnIp(vpnIp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
n.l.Debugf("Not found in hostmap: %s", vpnIp)
|
n.l.Debugf("Not found in hostmap: %s", vpnIp)
|
||||||
|
n.ClearIP(vpnIp)
|
||||||
if !n.intf.disconnectInvalid {
|
n.ClearPendingDeletion(vpnIp)
|
||||||
n.ClearIP(vpnIp)
|
continue
|
||||||
n.ClearPendingDeletion(vpnIp)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if n.handleInvalidCertificate(now, vpnIp, hostinfo) {
|
if n.handleInvalidCertificate(now, vpnIp, hostinfo) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user