mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 23:17:29 +00:00
all: declare & plumb IPv6 masquerade address for peer
This PR plumbs through awareness of an IPv6 SNAT/masquerade address from the wire protocol through to the low-level (tstun / wgengine). This PR is the first in two PRs for implementing IPv6 NAT support to/from peers. A subsequent PR will implement the data-plane changes to implement IPv6 NAT - this is just plumbing. Signed-off-by: Tom DNetto <tom@tailscale.com> Updates ENG-991
This commit is contained in:
@@ -60,6 +60,9 @@ func (src *Peer) Clone() *Peer {
|
||||
if dst.V4MasqAddr != nil {
|
||||
dst.V4MasqAddr = ptr.To(*src.V4MasqAddr)
|
||||
}
|
||||
if dst.V6MasqAddr != nil {
|
||||
dst.V6MasqAddr = ptr.To(*src.V6MasqAddr)
|
||||
}
|
||||
return dst
|
||||
}
|
||||
|
||||
@@ -69,6 +72,7 @@ var _PeerCloneNeedsRegeneration = Peer(struct {
|
||||
DiscoKey key.DiscoPublic
|
||||
AllowedIPs []netip.Prefix
|
||||
V4MasqAddr *netip.Addr
|
||||
V6MasqAddr *netip.Addr
|
||||
PersistentKeepalive uint16
|
||||
WGEndpoint key.NodePublic
|
||||
}{})
|
||||
|
Reference in New Issue
Block a user