mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-27 10:47:35 +00:00
tailcfg: add a field to advertise support for IPv6 tailscale config.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
7a2a3955d3
commit
c6dbd24f67
@ -45,6 +45,10 @@ import (
|
|||||||
"tailscale.com/version"
|
"tailscale.com/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
enableV6Overlay, _ = strconv.ParseBool(os.Getenv("TS_DEBUG_ENABLE_IPV6_OVERLAY"))
|
||||||
|
)
|
||||||
|
|
||||||
type Persist struct {
|
type Persist struct {
|
||||||
_ structs.Incomparable
|
_ structs.Incomparable
|
||||||
|
|
||||||
@ -527,6 +531,7 @@ func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*NetworkM
|
|||||||
request := tailcfg.MapRequest{
|
request := tailcfg.MapRequest{
|
||||||
Version: 4,
|
Version: 4,
|
||||||
IncludeIPv6: true,
|
IncludeIPv6: true,
|
||||||
|
IncludeIPv6Overlay: enableV6Overlay,
|
||||||
DeltaPeers: true,
|
DeltaPeers: true,
|
||||||
KeepAlive: c.keepAlive,
|
KeepAlive: c.keepAlive,
|
||||||
NodeKey: tailcfg.NodeKey(persist.PrivateNodeKey.Public()),
|
NodeKey: tailcfg.NodeKey(persist.PrivateNodeKey.Public()),
|
||||||
|
@ -468,6 +468,7 @@ type MapRequest struct {
|
|||||||
DiscoKey DiscoKey
|
DiscoKey DiscoKey
|
||||||
Endpoints []string // caller's endpoints (IPv4 or IPv6)
|
Endpoints []string // caller's endpoints (IPv4 or IPv6)
|
||||||
IncludeIPv6 bool // include IPv6 endpoints in returned Node Endpoints
|
IncludeIPv6 bool // include IPv6 endpoints in returned Node Endpoints
|
||||||
|
IncludeIPv6Overlay bool // include IPv6 Addresses and AllowedIPs in returned Nodes.
|
||||||
DeltaPeers bool // whether the 2nd+ network map in response should be deltas, using PeersChanged, PeersRemoved
|
DeltaPeers bool // whether the 2nd+ network map in response should be deltas, using PeersChanged, PeersRemoved
|
||||||
Stream bool // if true, multiple MapResponse objects are returned
|
Stream bool // if true, multiple MapResponse objects are returned
|
||||||
Hostinfo *Hostinfo
|
Hostinfo *Hostinfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user