wgengine/wgcfg/nmcfg: don't configure peers who can't DERP or disco.

Fixes #2770

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/2776/head
David Anderson 3 years ago committed by Dave Anderson
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…
Cancel
Save