Lighthouse reload support (#649)

Co-authored-by: John Maguire <contact@johnmaguire.me>
This commit is contained in:
Nate Brown
2022-03-14 12:35:13 -05:00
committed by GitHub
parent bbe0a032bb
commit 312a01dc09
13 changed files with 471 additions and 222 deletions

View File

@@ -160,9 +160,10 @@ func (c *Control) CloseTunnel(vpnIp iputil.VpnIp, localOnly bool) bool {
func (c *Control) CloseAllTunnels(excludeLighthouses bool) (closed int) {
//TODO: this is probably better as a function in ConnectionManager or HostMap directly
c.f.hostMap.Lock()
lighthouses := c.f.lightHouse.GetLighthouses()
for _, h := range c.f.hostMap.Hosts {
if excludeLighthouses {
if _, ok := c.f.lightHouse.lighthouses[h.vpnIp]; ok {
if _, ok := lighthouses[h.vpnIp]; ok {
continue
}
}