mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
wgengine/wgcfg/nmcfg: don't configure peers who can't DERP or disco.
Fixes #2770 Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
f90ac11bd8
commit
954064bdfe
@ -69,6 +69,12 @@ func WGCfg(nm *netmap.NetworkMap, logf logger.Logf, flags netmap.WGConfigFlags,
|
||||
if controlclient.Debug.OnlyDisco && peer.DiscoKey.IsZero() {
|
||||
continue
|
||||
}
|
||||
if peer.DiscoKey.IsZero() && peer.DERP == "" {
|
||||
// Peer predates both DERP and active discovery, we cannot
|
||||
// communicate with it.
|
||||
logf("[v1] wgcfg: skipped peer %s, doesn't offer DERP or disco", peer.Key.ShortString())
|
||||
continue
|
||||
}
|
||||
cfg.Peers = append(cfg.Peers, wgcfg.Peer{
|
||||
PublicKey: wgkey.Key(peer.Key),
|
||||
DiscoKey: peer.DiscoKey,
|
||||
|
Loading…
Reference in New Issue
Block a user