mirror of
https://github.com/tailscale/tailscale.git
synced 2026-07-14 17:43:03 -04:00
The wireguard-go device now learns its peer set solely from the live per-peer config source that LocalBackend installs with Engine.SetPeerConfigFunc, backed by the route manager. Peers are created lazily on first packet and converged per peer with Engine.SyncDevicePeer, so the full-peer-list snapshot in wgcfg.Config and the diff-and-reconfigure machinery around it (wgcfg.Peer, SyncPeers, ReconfigDevice) are dead weight: they duplicated state that the route manager already owns and forced every netmap change to rebuild and rehash the entire peer list. Delete the Peers field and the Peer type from wgcfg, along with SyncPeers and ReconfigDevice. Engine.Reconfig no longer does any device peer work; it only manages the private key, addresses, and the non-peer subsystems. Full-netmap application converges the device by syncing exactly the peers whose routes the route manager reports as changed or removed. Updates #12542 Change-Id: Ic776e42cfaa5be6b9329b3d381d5cbde17d7078b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>