Issue #5097 has been updated by Jeremy Evans.

File ipv6_recvpktinfo_test.rb added

=begin
It appears that OpenBSD has the correct behavior without including the pktinfo argument. I'm attaching a test program.  Here's two examples of usage and the output of each.

Without including pktinfo in the server's sendmsg call in response to the recvmsg:

  $ ruby19 ipv6_recvpktinfo_test.rb fe80::92fb:a6ff:feed:afa1%re0
  [:server_listening_on, #<Addrinfo: [::]:10000 UDP>]
  [:server_recvmsg_nonblock_output, "foo", #<Addrinfo: [fe80::92fb:a6ff:feed:afa1%re0]:3426 UDP>, [#<Socket::AncillaryData: INET6 IPV6 PKTINFO fe80::92fb:a6ff:feed:afa1 re0>]]
  [:server_response_sendmsg_args, ["oof", 0, #<Addrinfo: [fe80::92fb:a6ff:feed:afa1%re0]:3426 UDP>]]
  [:response_from_server, "oof", #<Addrinfo: [fe80::92fb:a6ff:feed:afa1%re0]:10000 UDP>]

Note in the last line of the output how the response received from the server uses the correct IPv6 address (fe80::92fb:a6ff:feed:afa1%re0 even though the server is listening on ::).

When including the pktinfo in the send message call, things break:
 
  $ ruby19 ipv6_recvpktinfo_test.rb fe80::92fb:a6ff:feed:afa1%re0 pktinfo
  [:server_listening_on, #<Addrinfo: [::]:10000 UDP>]
  [:server_recvmsg_nonblock_output, "foo", #<Addrinfo: [fe80::92fb:a6ff:feed:afa1%re0]:23171 UDP>, [#<Socket::AncillaryData: INET6 IPV6 PKTINFO fe80::92fb:a6ff:feed:afa1 re0>]]
  [:server_response_sendmsg_args, ["oof", 0, #<Addrinfo: [fe80::92fb:a6ff:feed:afa1%re0]:23171 UDP>, #<Socket::AncillaryData: INET6 IPV6 PKTINFO fe80::92fb:a6ff:feed:afa1 re0>]]
  ipv6_recvpktinfo_test.rb:23:in `block in <main>': no response from #<Addrinfo: [fe80::92fb:a6ff:feed:afa1%re0]:10000 UDP> (RuntimeError)
        from /usr/local/lib/ruby/1.9.1/socket.rb:45:in `connect_internal'
        from /usr/local/lib/ruby/1.9.1/socket.rb:92:in `connect'
        from ipv6_recvpktinfo_test.rb:21:in `<main>'

Running tcpdump without the pktinfo argument shows no output, while running tcpdump with the pktinfo argument shows the following output:

  16:28:55.962400 fe80::92fb:a6ff:feed:afa1.10000 > fe80::92fb:a6ff:feed:afa1.23171: [udp sum ok] udp 3 (len 11, hlim 64)
  tcpdump: WARNING: compensating for unaligned libpcap packets
  16:28:55.962407 fe80::1 > fe80::92fb:a6ff:feed:afa1: icmp6: fe80::92fb:a6ff:feed:afa1 unreachable address (len 59, hlim 64)

Note how the response is not a UDP packet but an ICMP packet with an fe80::1 source address saying the response is unreachable.  This is why the program times out, no UDP response is received.

So maybe there is a bug here, but OpenBSD supports the desired feature without the pktinfo argument in the sendmsg call.  If the pktinfo argument is needed on other systems to work correctly, would you support a patch that adds the pktinfo argument to the sendmsg call unless /openbsd/ =~ RUBY_PLATFORM ?

=end

----------------------------------------
Feature #5097: Supported platforms of Ruby 1.9.3
http://redmine.ruby-lang.org/issues/5097

Author: Yui NARUSE
Status: Assigned
Priority: Normal
Assignee: Yui NARUSE
Category: 
Target version: 1.9.3


Let's decide the supported platforms.

== Background

http://redmine.ruby-lang.org/projects/ruby-19/wiki/SupportedPlatforms

== Process

If you want to support a platform, please declare.
But when a platform dependent bug is reported, it will be assigned to you.

== Current Maintainer

mswin32, mswin64 (Microsoft Windows):
  NAKAMURA Usaku (usa)
mingw32 (Minimalist GNU for Windows):
  Nobuyoshi Nakada (nobu)
IA-64 (Debian GNU/Linux):
  TAKANO Mitsuhiro (takano32)
Symbian OS:
  Alexander Zavorine (azov)
AIX:
  Yutaka Kanemoto (kanemoto)
FreeBSD:
  Akinori MUSHA (knu)
Solaris:
  Naohisa Goto
RHEL, CentOS
  KOSAKI Motohiro

Platforms which doesn't have a maintainer are following:
* Debian
* Ubuntu
* Mac OS X (LLVM related issues)
* cygwin (don't work)
* NetBSD (works)
* OpenBSD (it may not work)
* DragonFlyBSD (don't work)


-- 
http://redmine.ruby-lang.org