summaryrefslogtreecommitdiffhomepage
path: root/wgengine/wgcfg/wgcfg_clone.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2026-04-15 00:49:12 +0000
committerBrad Fitzpatrick <bradfitz@tailscale.com>2026-04-25 01:53:13 +0000
commitf9cd7ada42a79a0ce552ec597f230bc7bf9a5702 (patch)
treeee4d73e8041520b402c13190f26aec5e71785129 /wgengine/wgcfg/wgcfg_clone.go
parent873b8b8e2e537026d3947df74399439d31d7dfbb (diff)
downloadtailscale-bradfitz/rm_lazy_wg.tar.xz
tailscale-bradfitz/rm_lazy_wg.zip
wgengine, all: remove LazyWG, use wireguard-go callback API for on-demand peersbradfitz/rm_lazy_wg
Replace the UAPI text protocol-based wireguard configuration with wireguard-go's new direct callback API (SetPeerLookupFunc, SetPeerByIPPacketFunc, RemoveMatchingPeers, SetPrivateKey). Instead of computing a trimmed wireguard config ahead of time upon control plane updates and pushing it via UAPI, install callbacks so wireguard-go creates peers on demand when packets arrive. This removes all the LazyWG trimming machinery: idle peer tracking, activity maps, noteRecvActivity callbacks, the KeepFullWGConfig control knob, and the ts_omit_lazywg build tag. For incoming packets, PeerLookupFunc answers wireguard-go's questions about unknown public keys by looking up the peer in the full config. For outgoing packets, PeerByIPPacketFunc (installed from LocalBackend.lookupPeerByIP) maps destination IPs to node public keys using the existing nodeByAddr index. Updates tailscale/corp#12345 Change-Id: I4cba80979ac49a1231d00a01fdba5f0c2af95dd8 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'wgengine/wgcfg/wgcfg_clone.go')
-rw-r--r--wgengine/wgcfg/wgcfg_clone.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/wgengine/wgcfg/wgcfg_clone.go b/wgengine/wgcfg/wgcfg_clone.go
index 9e8de7b6f..a8a212267 100644
--- a/wgengine/wgcfg/wgcfg_clone.go
+++ b/wgengine/wgcfg/wgcfg_clone.go
@@ -72,5 +72,4 @@ var _PeerCloneNeedsRegeneration = Peer(struct {
V6MasqAddr *netip.Addr
IsJailed bool
PersistentKeepalive uint16
- WGEndpoint key.NodePublic
}{})