mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 11:01:54 +00:00
ipn/ipnlocal: also accept service IP IPv6 literal in brackets for quad100
The fix in 4fc8538e2
was sufficient for IPv6. Browsers (can?) send the
IPv6 literal, even without a port number, in brackets.
Updates tailscale/corp#7948
Change-Id: I0e429d3de4df8429152c12f251ab140b0c8f6b77
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
296e712591
commit
e9c851b04b
@@ -32,12 +32,26 @@ func TestInCrostiniRange(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestTailscaleServiceIP(t *testing.T) {
|
||||
got := TailscaleServiceIP().String()
|
||||
want := "100.100.100.100"
|
||||
if got != want {
|
||||
t.Errorf("got %q; want %q", got, want)
|
||||
}
|
||||
if TailscaleServiceIPString != want {
|
||||
t.Error("TailscaleServiceIPString is not consistent")
|
||||
}
|
||||
}
|
||||
|
||||
func TestTailscaleServiceIPv6(t *testing.T) {
|
||||
got := TailscaleServiceIPv6().String()
|
||||
want := "fd7a:115c:a1e0::53"
|
||||
if got != want {
|
||||
t.Errorf("got %q; want %q", got, want)
|
||||
}
|
||||
if TailscaleServiceIPv6String != want {
|
||||
t.Error("TailscaleServiceIPv6String is not consistent")
|
||||
}
|
||||
}
|
||||
|
||||
func TestChromeOSVMRange(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user