From: ts Date: 2001-09-05T19:07:43+09:00 Subject: [ruby-talk:20912] Re: Problem with druby related to TCPServer implementation on linux >>>>> "C" == Christian Boos <(by way of Christian Boos ) (by way of Christian Boos )> writes: C> - SuSE Linux 7.2 (kernel 2.4.4) C> - ruby 1.6.4 moulon% ruby -v ruby 1.6.4 (2001-06-04) [sparc-solaris2.7] moulon% C> ------------------------------------------------------------------- C> irb(main):001:0> require 'socket' C> true C> irb(main):002:0> soc = TCPServer.open(0) C> # C> irb(main):003:0> soc.addr[1] C> SocketError: getnameinfo: ai_family not supported C> from (irb):6:in `addr' C> from (irb):6 C> -------------------------------- moulon% irb irb(main):001:0> require 'socket' true irb(main):002:0> soc = TCPServer.open(0) # irb(main):003:0> p soc.addr ["AF_INET", 37293, "0.0.0.0", "0.0.0.0"] nil irb(main):004:0> ^D moulon% C> Changing it to PF_INET solves to problem, however I don't know enough about C> the code to see if this is a proper fix. or just a hack :) No, it must be set to PF_UNSPEC to handle IPv6/IPv4 Guy Decoux