Commit dd7a4b48 authored by Mikio Hara's avatar Mikio Hara

x.net/ipv6: fix path mtu test on older darwin kernels

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/173290043
parent b56b6099
......@@ -41,7 +41,12 @@ func TestConnInitiatorPathMTU(t *testing.T) {
defer c.Close()
if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
t.Fatal(err)
switch runtime.GOOS {
case "darwin": // older darwin kernels don't support IPV6_PATHMTU option
t.Logf("not supported on %q", runtime.GOOS)
default:
t.Fatal(err)
}
} else {
t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu)
}
......@@ -74,7 +79,12 @@ func TestConnResponderPathMTU(t *testing.T) {
defer c.Close()
if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil {
t.Fatal(err)
switch runtime.GOOS {
case "darwin": // older darwin kernels don't support IPV6_PATHMTU option
t.Logf("not supported on %q", runtime.GOOS)
default:
t.Fatal(err)
}
} else {
t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment