mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 12:02:23 +00:00
tailcfg, controlclient, magicsock: request IPv6 endpoints, but ignore them
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
12a6626a94
commit
94024355ed
@ -449,6 +449,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,
|
||||||
KeepAlive: c.keepAlive,
|
KeepAlive: c.keepAlive,
|
||||||
NodeKey: tailcfg.NodeKey(persist.PrivateNodeKey.Public()),
|
NodeKey: tailcfg.NodeKey(persist.PrivateNodeKey.Public()),
|
||||||
Endpoints: ep,
|
Endpoints: ep,
|
||||||
|
@ -395,7 +395,8 @@ type MapRequest struct {
|
|||||||
Compress string // "zstd" or "" (no compression)
|
Compress string // "zstd" or "" (no compression)
|
||||||
KeepAlive bool // server sends keep-alives
|
KeepAlive bool // server sends keep-alives
|
||||||
NodeKey NodeKey
|
NodeKey NodeKey
|
||||||
Endpoints []string
|
Endpoints []string // caller's endpoints (IPv4 or IPv6)
|
||||||
|
IncludeIPv6 bool // include IPv6 endpoints in returned Node Endpoints
|
||||||
Stream bool // if true, multiple MapResponse objects are returned
|
Stream bool // if true, multiple MapResponse objects are returned
|
||||||
Hostinfo *Hostinfo
|
Hostinfo *Hostinfo
|
||||||
}
|
}
|
||||||
|
@ -1456,6 +1456,10 @@ func (c *Conn) CreateEndpoint(key [32]byte, addrs string) (conn.Endpoint, error)
|
|||||||
}
|
}
|
||||||
if ip4 := addr.IP.To4(); ip4 != nil {
|
if ip4 := addr.IP.To4(); ip4 != nil {
|
||||||
addr.IP = ip4
|
addr.IP = ip4
|
||||||
|
} else {
|
||||||
|
// TODO(bradfitz): stop skipping IPv6 ones for now.
|
||||||
|
c.logf("magicsock: CreateEndpoint: ignoring IPv6 addr %v for now", addr)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
a.addrs = append(a.addrs, *addr)
|
a.addrs = append(a.addrs, *addr)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user