Backport #8517
closed
Enable IPV6_PKTINFO on OS X
Added by drbrain (Eric Hodel) almost 11 years ago.
Updated almost 11 years ago.
Description
=begin
Recent versions of OS X hide (({IPV6_PKTINFO})) (and some other socket options) behind (({__APPLE_USE_RFC_3542})) (or (({__APPLE_USE_RFC_2292}))).
This patch defines (({__APPLE_USE_RFC_3542})) when building the socket extension as netinet6/in6.h says "Note that eventually RFC 3542 is going to be the default and RFC 2292 will be obsolete."
With this patch IPV6_PKTINFO appears in Socket::Constants
=end
Files
This patch does not work. __APPLE_USE_RFC_2292 does work, but I am unsure how the OS knows which socket options you wish to use.
=begin
Oops, my previous comment was in error.
I was attempting to (({setsockopt :IPPROTO_IPV6, :IPV6_PKTINFO, true})) (RFC 2922) when you must set (({IPV6_RECVPKTINFO})) for an RFC 3542 implementation, so this patch is OK.
=end
- Target version set to 2.1.0
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: REQUIRED, 2.0.0: REQUIRED
/usr/include/netinet6/in6.h says
/*
- RFC 3542 define the following socket options in a manner incompatible
- with RFC 2292:
- IPV6_PKTINFO
- IPV6_HOPLIMIT
- IPV6_NEXTHOP
- IPV6_HOPOPTS
- IPV6_DSTOPTS
- IPV6_RTHDR
-
- To use the new IPv6 Sockets options introduced by RFC 3542
- the constant __APPLE_USE_RFC_3542 must be defined before
- including <netinet/in.h>
-
- To use the old IPv6 Sockets options from RFC 2292
- the constant __APPLE_USE_RFC_2292 must be defined before
- including <netinet/in.h>
-
- Note that eventually RFC 3542 is going to be the
- default and RFC 2292 will be obsolete.
*/
So commit it!
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r41266.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
10.7+. [ruby-trunk - Bug #8517]
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Category deleted (
ext)
- Status changed from Closed to Assigned
- Assignee set to nagachika (Tomoyuki Chikanaga)
- Target version deleted (
2.1.0)
- Status changed from Assigned to Closed
This issue was solved with changeset r41320.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 41266: [Backport #8517]
* ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
10.7+. [ruby-trunk - Bug #8517]
- Project changed from Backport200 to Backport193
- Status changed from Closed to Assigned
- Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)
- Status changed from Assigned to Closed
This issue was solved with changeset r41643.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 41266: [Backport #8517]
* ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
10.7+. [ruby-trunk - Bug #8517]
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0Like0