Project

General

Profile

Backport #8517

Enable IPV6_PKTINFO on OS X

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

Status:
Closed
Priority:
Normal
[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

Associated revisions

Revision d3412765
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 41266
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

Revision 41266
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

Revision 41266
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

Revision 41266
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

Revision 41266
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

Revision 41266
Added by drbrain (Eric Hodel) about 6 years ago

  • ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X 10.7+. [ruby-trunk - Bug #8517]

Revision 9fb5a1cd
Added by nagachika (Tomoyuki Chikanaga) about 6 years ago

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision c6d80075
Added by usa (Usaku NAKAMURA) almost 6 years ago

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 41643
Added by usa (Usaku NAKAMURA) almost 6 years ago

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]

History

Updated by drbrain (Eric Hodel) about 6 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) about 6 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) about 6 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 *
  • To use the old IPv6 Sockets options from RFC 2292
  • the constant __APPLE_USE_RFC_2292 must be defined before
  • including *
  • Note that eventually RFC 3542 is going to be the
  • default and RFC 2292 will be obsolete. */

So commit it!

#4

Updated by drbrain (Eric Hodel) about 6 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]
#5

Updated by nagachika (Tomoyuki Chikanaga) about 6 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby trunk to Backport200
  • Category deleted (ext)
  • Status changed from Closed to Assigned
  • Assignee set to nagachika (Tomoyuki Chikanaga)
  • Target version deleted (2.1.0)
#6

Updated by nagachika (Tomoyuki Chikanaga) about 6 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]
#7

Updated by nagachika (Tomoyuki Chikanaga) about 6 years ago

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

Updated by usa (Usaku NAKAMURA) almost 6 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]

Also available in: Atom PDF