diff options
author | Mikio Hara <mikioh.mikioh@gmail.com> | 2014-11-13 07:19:05 +0900 |
---|---|---|
committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2014-11-13 07:19:05 +0900 |
commit | 0d3526158ce26e78124fdc7709d86802436dc78f (patch) | |
tree | e037969cd0feffec260d13a946b2933e71d313f3 /ipv4 | |
parent | 153a6a61520e23dabb758b4a612bff144e5e28eb (diff) | |
download | net-0d3526158ce26e78124fdc7709d86802436dc78f.tar.gz |
x/net/ipv4: don't enable advanced features on OS X 10.7 and below
Looks like OS X 10.8 is the safe harbor.
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/167630043
Diffstat (limited to 'ipv4')
-rw-r--r-- | ipv4/sys_darwin.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ipv4/sys_darwin.go b/ipv4/sys_darwin.go index 9f0e809..c4c962b 100644 --- a/ipv4/sys_darwin.go +++ b/ipv4/sys_darwin.go @@ -47,9 +47,11 @@ func init() { continue } } - // The IP_PKTINFO was introduced in OS X 10.7 (Darwin - // 11.0.0). See http://support.apple.com/kb/HT1633. - if i > 2 || i == 2 && osver[0] >= '1' && osver[1] >= '1' { + // The IP_PKTINFO and protocol-independent multicast API were + // introduced in OS X 10.7 (Darwin 11.0.0). But it looks like + // those features require OS X 10.8 (Darwin 12.0.0) and above. + // See http://support.apple.com/kb/HT1633. + if i > 2 || i == 2 && osver[0] >= '1' && osver[1] >= '2' { ctlOpts[ctlPacketInfo].name = sysIP_PKTINFO ctlOpts[ctlPacketInfo].length = sysSizeofInetPktinfo ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo |