1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd netbsd openbsd
19 if runtime.GOOS == "darwin" {
20 // See http://support.apple.com/kb/HT1633.
21 s, err := syscall.Sysctl("kern.osrelease")
25 ss := strings.Split(s, ".")
29 darwinVersion, _ = strconv.Atoi(ss[0])
33 func supportsIPv6MulticastDeliveryOnLoopback() bool {
36 // See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
37 // Even after the fix, it looks like the latest
38 // kernels don't deliver link-local scoped multicast
42 return !causesIPv6Crash()
48 func causesIPv6Crash() bool {
49 // We see some kernel crash when running IPv6 with IP-level
50 // options on Darwin kernel version 12 or below.
51 // See golang.org/issues/17015.
52 return darwinVersion < 13