mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-31 03:38:36 +00:00
wgengine: correctly track all node IPs in lazy config.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
3fa86a8b23
commit
9936cffc1a
@ -807,11 +807,14 @@ func (e *userspaceEngine) maybeReconfigWireguardLocked(discoChanged map[key.Publ
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
tsIP := p.AllowedIPs[0].IP
|
|
||||||
dk := discoKeyFromPeer(p)
|
dk := discoKeyFromPeer(p)
|
||||||
trackDisco = append(trackDisco, dk)
|
trackDisco = append(trackDisco, dk)
|
||||||
trackIPs = append(trackIPs, tsIP)
|
recentlyActive := false
|
||||||
if e.isActiveSince(dk, tsIP, activeCutoff) {
|
for _, cidr := range p.AllowedIPs {
|
||||||
|
trackIPs = append(trackIPs, cidr.IP)
|
||||||
|
recentlyActive = recentlyActive || e.isActiveSince(dk, cidr.IP, activeCutoff)
|
||||||
|
}
|
||||||
|
if recentlyActive {
|
||||||
min.Peers = append(min.Peers, *p)
|
min.Peers = append(min.Peers, *p)
|
||||||
if discoChanged[key.Public(p.PublicKey)] {
|
if discoChanged[key.Public(p.PublicKey)] {
|
||||||
needRemoveStep = true
|
needRemoveStep = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user