Project

General

Profile

Actions

Backport #8517

closed

Enable IPV6_PKTINFO on OS X

Added by drbrain (Eric Hodel) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
[ruby-core:55453]

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

socket.apple_IPV6_PKTINFO.patch (443 Bytes) socket.apple_IPV6_PKTINFO.patch drbrain (Eric Hodel), 06/12/2013 11:25 AM

Updated by drbrain (Eric Hodel) almost 11 years ago

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.

Updated by drbrain (Eric Hodel) almost 11 years ago

=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

Updated by naruse (Yui NARUSE) almost 11 years ago

  • 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!

Actions #4

Updated by drbrain (Eric Hodel) almost 11 years ago

  • 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]
Actions #5

Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago

  • 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)
Actions #6

Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago

  • 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]
Actions #7

Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago

  • Project changed from Backport200 to Backport193
  • Status changed from Closed to Assigned
  • Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)
Actions #8

Updated by usa (Usaku NAKAMURA) almost 11 years ago

  • 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]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0