mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-05 18:20:48 -08:00
Pull hostmap and pending hostmap apart, remove unused functions (#843)
This commit is contained in:
parent
52c9e360e7
commit
a10baeee92
16 changed files with 292 additions and 295 deletions
|
|
@ -147,12 +147,12 @@ func (c *Control) GetUDPAddr() string {
|
|||
}
|
||||
|
||||
func (c *Control) KillPendingTunnel(vpnIp net.IP) bool {
|
||||
hostinfo, ok := c.f.handshakeManager.pendingHostMap.Hosts[iputil.Ip2VpnIp(vpnIp)]
|
||||
if !ok {
|
||||
hostinfo := c.f.handshakeManager.QueryVpnIp(iputil.Ip2VpnIp(vpnIp))
|
||||
if hostinfo == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
c.f.handshakeManager.pendingHostMap.DeleteHostInfo(hostinfo)
|
||||
c.f.handshakeManager.DeleteHostInfo(hostinfo)
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue