mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 11:41:39 +00:00
net/tsaddr: add new IP range for ephemeral nodes in Tailscale ULA (#1715)
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
b993d9802a
commit
b85d80b37f
@ -35,6 +35,7 @@ var (
|
|||||||
ulaRange oncePrefix
|
ulaRange oncePrefix
|
||||||
tsUlaRange oncePrefix
|
tsUlaRange oncePrefix
|
||||||
ula4To6Range oncePrefix
|
ula4To6Range oncePrefix
|
||||||
|
ulaEph6Range oncePrefix
|
||||||
)
|
)
|
||||||
|
|
||||||
// TailscaleServiceIP returns the listen address of services
|
// TailscaleServiceIP returns the listen address of services
|
||||||
@ -72,6 +73,17 @@ func Tailscale4To6Range() netaddr.IPPrefix {
|
|||||||
return ula4To6Range.v
|
return ula4To6Range.v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TailscaleEphemeral6Range returns the subset of TailscaleULARange
|
||||||
|
// used for ephemeral IPv6-only Tailscale nodes.
|
||||||
|
func TailscaleEphemeral6Range() netaddr.IPPrefix {
|
||||||
|
// This IP range has no significance, beyond being a subset of
|
||||||
|
// TailscaleULARange. The bits from /48 to /104 were picked at
|
||||||
|
// random, with the only criterion being to not be the conflict
|
||||||
|
// with the Tailscale4To6Range above.
|
||||||
|
ulaEph6Range.Do(func() { mustPrefix(&ulaEph6Range.v, "fd7a:115c:a1e0:7234:6e44:306d:2100::/104") })
|
||||||
|
return ulaEph6Range.v
|
||||||
|
}
|
||||||
|
|
||||||
// Tailscale4To6Placeholder returns an IP address that can be used as
|
// Tailscale4To6Placeholder returns an IP address that can be used as
|
||||||
// a source IP when one is required, but a netmap didn't provide
|
// a source IP when one is required, but a netmap didn't provide
|
||||||
// any. This address never gets allocated by the 4-to-6 algorithm in
|
// any. This address never gets allocated by the 4-to-6 algorithm in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user