mirror of
				https://github.com/tailscale/tailscale.git
				synced 2025-11-04 09:25:11 +00:00 
			
		
		
		
	wgengine/wgcfg/nmcfg: skip expired peers
Updates tailscale/corp#19315 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I1ad0c8796efe3dd456280e51efaf81f6d2049772
This commit is contained in:
		@@ -91,6 +91,14 @@ func WGCfg(nm *netmap.NetworkMap, logf logger.Logf, flags netmap.WGConfigFlags,
 | 
				
			|||||||
			logf("[v1] wgcfg: skipped peer %s, doesn't offer DERP or disco", peer.Key().ShortString())
 | 
								logf("[v1] wgcfg: skipped peer %s, doesn't offer DERP or disco", peer.Key().ShortString())
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							// Skip expired peers; we'll end up failing to connect to them
 | 
				
			||||||
 | 
							// anyway, since control intentionally breaks node keys for
 | 
				
			||||||
 | 
							// expired peers so that we can't discover endpoints via DERP.
 | 
				
			||||||
 | 
							if peer.Expired() {
 | 
				
			||||||
 | 
								logf("[v1] wgcfg: skipped expired peer %s", peer.Key().ShortString())
 | 
				
			||||||
 | 
								continue
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		cfg.Peers = append(cfg.Peers, wgcfg.Peer{
 | 
							cfg.Peers = append(cfg.Peers, wgcfg.Peer{
 | 
				
			||||||
			PublicKey: peer.Key(),
 | 
								PublicKey: peer.Key(),
 | 
				
			||||||
			DiscoKey:  peer.DiscoKey(),
 | 
								DiscoKey:  peer.DiscoKey(),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user