mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 10:01:57 +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:
@@ -186,6 +186,14 @@ func (v NodeView) SelfNodeV4MasqAddrForThisPeer() *netip.Addr {
|
||||
return &x
|
||||
}
|
||||
|
||||
func (v NodeView) SelfNodeV6MasqAddrForThisPeer() *netip.Addr {
|
||||
if v.ж.SelfNodeV6MasqAddrForThisPeer == nil {
|
||||
return nil
|
||||
}
|
||||
x := *v.ж.SelfNodeV6MasqAddrForThisPeer
|
||||
return &x
|
||||
}
|
||||
|
||||
func (v NodeView) IsWireGuardOnly() bool { return v.ж.IsWireGuardOnly }
|
||||
func (v NodeView) ExitNodeDNSResolvers() views.SliceView[*dnstype.Resolver, dnstype.ResolverView] {
|
||||
return views.SliceOfViews[*dnstype.Resolver, dnstype.ResolverView](v.ж.ExitNodeDNSResolvers)
|
||||
@@ -225,6 +233,7 @@ var _NodeViewNeedsRegeneration = Node(struct {
|
||||
DataPlaneAuditLogID string
|
||||
Expired bool
|
||||
SelfNodeV4MasqAddrForThisPeer *netip.Addr
|
||||
SelfNodeV6MasqAddrForThisPeer *netip.Addr
|
||||
IsWireGuardOnly bool
|
||||
ExitNodeDNSResolvers []*dnstype.Resolver
|
||||
}{})
|
||||
|
||||
Reference in New Issue
Block a user