From: Tanaka Akira Date: 2011-07-30T00:45:59+09:00 Subject: [ruby-core:38599] Re: [Ruby 1.9 - Feature #5097] Supported platforms of Ruby 1.9.3 2011/7/28 Jeremy Evans : > The issue is that Socket.ip_address_list and Addrinfo.foreach return different things. > > $ ruby19 -rsocket -e 'p Socket.ip_address_list' > [#, #, #, #, #] > $ ruby19 -rsocket -e 'Addrinfo.foreach(nil, 0, nil, :DGRAM, nil, Socket::AI_PASSIVE) {|ai| p ai}' > # > # It is not a problem. GNU/Linux also behaves as so. GNU/Linux% ./ruby -rsocket -e 'p Socket.ip_address_list' [#, #, #, #] GNU/Linux% ./ruby -rsocket -e 'Addrinfo.foreach(nil, 0, nil, :DGRAM, nil, Socket::AI_PASSIVE) {|ai| p ai}' # # > I can see where it wouldn't support dynamic IP address change. But it also doesn't listen on all local addresses (# in this case), and that fails one of the tests. So either the test needs to be changed to not require that behavior or the code needs to be change to listen on all local addresses in addition to listening on '::' in the ipv6_recvpktinfo case. If IPV6_PKTINFO is usable, we don't need to listen all addresses because we can detect the destination address of a incoming packet using pktinfo. (The address is used later to reply from the address.) My intent is follows. * If IPV6_PKTINFO is usable, listen only "::" (for IPv6). The destination address is detected by pktinfo. This way can handle dynamic IP change. * If IPV6_PKTINFO is not usable, listen all local IPv6 addresses. The destination address is detected by the socket. This way doesn't support dynamic IP change, though. I can't understand why OpenBSD fails the test. -- Tanaka Akira