Resolv::DNS#getaddresses doesn't return IPv6 address

[email protected]@%$G$9!#e(B

Resolv::DNS#getaddresses e$BEy$,e(B IPv6 e$B%"%I%l%9$rJV$7$^$;$s!#e(B

e$B$?$H$($P!“e(Bwww.jprs.jp e$B$K$Oe(B AAAA
e$B%l%3!<%I$,@_Dj$7$F$”$k$N$G$9$,!“e(BIPv4e$B%”%Ie(B
e$B%l%9$7$+JV$C$F$-$^$;$s!#e(B

% dig any www.jprs.jp

;; ANSWER SECTION:
www.jprs.jp. 82163 IN A 202.11.16.167
www.jprs.jp. 82163 IN AAAA 2001:218:2003::1

% ruby -rresolv -e’p Resolv::DNS.new.getaddresses(“www.jprs.jp”)’
[#<Resolv::IPv4 202.11.16.167>]

e$B$3$l$O!“e(B390e$B9TL$”$?$j$Ne(B Resolv::DNS#each_address e$B$,e(B A
e$B%l%3!<%I$7$+<h$C$Fe(B
e$B$-$F$$$J$$$+$i$G$9!#e(B

 def each_address(name)
  each_resource(name, Resource::IN::A) {|resource| yield

resource.address}
end

e$B0J2<$N$h$&$Ke(B ANY
e$B$G$9$Y$F=&$C$F$/$k$h$&$K$9$l$P2r7h$7$^$9!#$3$N>l9g!“e(B
IPv6 e$B%”%I%l%9$N$_$N%[%9%H$N$H$-$K!"e(Bgetaddress e$B$G:#$^$Ge(B no
address [email protected]$C$?e(B
e$B$H$3$m!“e(BIPv6 e$B%”%I%l%9$,JV$k$h$&$K$J$j$^$9!#e(B

e$B$J$*!"e(Bbuf [email protected]_$1$J$$>l9g!“e(Bns0.v6.ntt.net e$B$N$h$&$Ke(B AAAA
e$B%l%3!<%I$,e(B A e$B%le(B
e$B%3!<%[email protected]$KEPO?$5$l$F$$$k%[%9%H$N;~$Ke(B getaddress e$B$Ge(B IPv6
e$B%”%I%l%9$,e(B
e$BJV$C$F$-$F$7$^$&$?$a!“[email protected]$KLdBj$,@8$8$k62$l$,$”$j$^$9!#e(B

Index: lib/resolv.rb

— lib/resolv.rb (e$B%j%S%8%g%se(B 14750)
+++ lib/resolv.rb (e$B:n6H%3%T!<e(B)
@@ -388,7 +388,16 @@
# be a Resolv::IPv4 or Resolv::IPv6

 def each_address(name)
  •  each_resource(name, Resource::IN::A) {|resource| yield
    

resource.address}

  •  buf = []
    
  •  each_resource(name, Resource::IN::ANY) do |resource|
    
  •   case resource.address
    
  •   when Resolv::IPv4
    
  •     yield resource.address
    
  •   when Resolv::IPv6
    
  •     buf << resource.address
    
  •   end
    
  •  end
    
  •  buf.each {|resource| yield resource.address}
    

    end

@@ -445,7 +454,6 @@
# * Resolv::DNS::Resource::IN::A
# * Resolv::DNS::Resource::IN::AAAA
# * Resolv::DNS::Resource::IN::ANY

  • * Resolv::DNS::Resource::IN::ANY

    * Resolv::DNS::Resource::IN::CNAME

    * Resolv::DNS::Resource::IN::HINFO

    * Resolv::DNS::Resource::IN::MINFO

In article [email protected],
“NARUSE, Yui” [email protected] writes:

e$B0J2<$N$h$&$Ke(B ANY e$B$G$9$Y$F=&$C$F$/$k$h$&$K$9$l$P2r7h$7$^$9!#$3$N>l9g!“e(B
IPv6 e$B%”%I%l%9$N$_$N%[%9%H$N$H$-$K!"e(Bgetaddress e$B$G:#$^$Ge(B no address [email protected]$C$?e(B
e$B$H$3$m!“e(BIPv6 e$B%”%I%l%9$,JV$k$h$&$K$J$j$^$9!#e(B

e$B$J$*!"e(Bbuf [email protected]_$1$J$$>l9g!“e(Bns0.v6.ntt.net e$B$N$h$&$Ke(B AAAA e$B%l%3!<%I$,e(B A e$B%le(B
e$B%3!<%[email protected]$KEPO?$5$l$F$$$k%[%9%H$N;~$Ke(B getaddress e$B$Ge(B IPv6 e$B%”%I%l%9$,e(B
e$BJV$C$F$-$F$7$^$&$?$a!“[email protected]$KLdBj$,@8$8$k62$l$,$”$j$^$9!#e(B

e$B$J$k$[$I!#$I$&$>!#e(B

e$B$3$s$K$A$O!#e(B

In message [email protected]
on Fri, 28 Dec 2007 14:57:26 +0900,
“NARUSE, Yui” [email protected] wrote:

 def each_address(name)
  each_resource(name, Resource::IN::A) {|resource| yield

resource.address}
end

e$B0J2<$N$h$&$Ke(B ANY e$B$G$9$Y$F=&$C$F$/$k$h$&$K$9$l$P2r7h$7$^$9!#$3$N>l9g!“e(B
IPv6 e$B%”%I%l%9$N$_$N%[%9%H$N$H$-$K!“e(Bgetaddress e$B$G:#$^$Ge(B no address [email protected]$C$?e(B
e$B$H$3$m!“e(BIPv6 e$B%”%I%l%9$,JV$k$h$&$K$J$j$^$9!#e(B
e$BFbItE*$JF0:n$rM}2r$7$F$$$J$$$N$G$9$,!”$3$l$O!"e(B

% dig example.com a

e$B$NBe$o$j$K!"e(B

% dig example.com any

e$B$H$$$C$?!"%?%$%W$,e(BANYe$B$NLd$$9g$o$;$r9T$&$H$$$&$3$H$G$7$g$&$+e(B?

In message [email protected]
on Sat, 5 Jan 2008 11:51:41 +0900,
“NARUSE, Yui” [email protected] wrote:

% dig example.com any

e$B$H$$$C$?!"%?%$%W$,e(BANYe$B$NLd$$9g$o$;$r9T$&$H$$$&$3$H$G$7$g$&$+e(B?

e$B$O$$!"$=$7$Fe(B A e$B$He(B AAAA e$B%l%3!<%I$N>[email protected]$1=&$C$F$$$^$9!#e(B
e$B2?$+I{:nMQ$H$+$"$j$^$7$?$C$1!)e(B
ANYe$B$K$h$kLd$$9g$o$;$O!"%M!<%`%5!<%P$,%-%c%C%7%e$r;}$C$F$$$k>l9g$O!"$=e(B
e$B$N%l%3!<%[email protected]$1$rJV$7$?$O$:$G$9!#e(B

e$B%-%c%C%7%e$,$J$$>l9g$O!“e(Brecursivee$B$JLd$$9g$o$;$G$”$l$P!"$=$l$J$j$N=hM}$re(B
e$B9T$C$FM_$7$$>pJs$,[email protected]$i$l$k$G$7$g$&!#e(B

e$B0lJ}!“2?$i$+$NM}M3$Ge(B A e$B$de(B AAAA
e$B%l%3!<%[email protected]$1$,%-%c%C%7%e$K;D$C$Fe(B
e$B$$$?>l9g$O!”[email protected]$1$,JV$j$^$9!#e(B

e$B0J>e$+$i!"e(BAe$B$He(BAAAAe$B%l%3!<%I$,M_$7$$$N$J$i!“LLE]$G$b%?%$%W$,e(BAe$B$He(BAAAAe$B$NLd$$e(B
e$B9g$o$;$rJL!9$K9T$&$Y$-!”$H$$$&$3$H$K$J$j$^$9!#e(B

[email protected]$1$G=q$$$F$$$^$9$,!"@N!9e(Bsendmaile$B$"$?$j$Ne(BMXe$B$rLd$$9g$o$;$k$H$-$N=he(B
e$BM}$GOCBj$K$J$C$F$$$^$7$?!#e(B

[email protected]@%$G$9!#e(B

Takahiro K. wrote:

e$B$H$$$C$?!"%?%$%W$,e(BANYe$B$NLd$$9g$o$;$r9T$&$H$$$&$3$H$G$7$g$&$+e(B?

e$B$O$$!"$=$7$Fe(B A e$B$He(B AAAA
e$B%l%3!<%I$N>[email protected]$1=&$C$F$$$^$9!#e(B
e$B2?$+I{:nMQ$H$+$"$j$^$7$?$C$1!)e(B

In message [email protected]
on Sun, 6 Jan 2008 01:05:01 +0900,
“NARUSE, Yui” [email protected] wrote:

e$B0lJ}!“2?$i$+$NM}M3$Ge(B A e$B$de(B AAAA e$B%l%3!<%[email protected]$1$,%-%c%C%7%e$K;D$C$Fe(B
e$B$$$?>l9g$O!”[email protected]$1$,JV$j$^$9!#e(B

e$B0J>e$+$i!"e(BAe$B$He(BAAAAe$B%l%3!<%I$,M_$7$$$N$J$i!“LLE]$G$b%?%$%W$,e(BAe$B$He(BAAAAe$B$NLd$$e(B
e$B9g$o$;$rJL!9$K9T$&$Y$-!”$H$$$&$3$H$K$J$j$^$9!#e(B
e$B$D$^$j$O!“e(BIPv4e$B$^$?$Oe(BIPv6e$B$N0lJ}[email protected]$1$r%M!<%`%5!<%P$,%-%c%C%7%e$KJ];}$7$Fe(B
e$B$$$F!“B8:_$9$k$O$:$Ne(BIPv4e$B$^$?$Oe(BIPv6e$B$N%”%I%l%[email protected]$i$l$J$$>u67$K4Y$k2DG=e(B
[email protected]$,$”$k$H$$$&$3$H$G$9!#e(B

e$B$J!<$k$[$I!"0J2<[email protected]$r%3%_%C%H$7$F$*$-$^$7$?!#e(B
e$B8e$O!“e(BIPv4e$B$He(BIPv6e$B$H$I$A$i$,@h$KJV$C$FMh$k$Y$-$+$H$$$C$?$”$?$j$G$7$g$&$+!#e(B
KAMEe$B$J<BAu$r%Y!<%9$K$7$?%j%>%k%P$G$O!“e(BIPv6e$B$,@h$KJV$C$FMh$k$h$&$K$7$F$$e(B
e$B$?$H;W$$$^$9!#e(B(e$BJL$K!”$=$&$7$J$1$l$P$$$1$J$$$H$$$&$o$1$G$O$J$/!“4{B8$Ne(B
e$B%j%>%k%P$NF0:n$K9g$o$;$k$H$9$k$J$i!”;29M$K$J$m$&$+$H!#e(B)

e$BG_K$G$9!#e(B

On Sun, 6 Jan 2008 01:23:46 +0900
Takahiro K. [email protected] said:

taca> > e$B$J!<$k$[$I!"0J2<[email protected]$r%3%_%C%H$7$F$*$-$^$7$?!#e(B
taca>
e$B8e$O!“e(BIPv4e$B$He(BIPv6e$B$H$I$A$i$,@h$KJV$C$FMh$k$Y$-$+$H$$$C$?$”$?$j$G$7$g$&$+!#e(B
taca>
KAMEe$B$J<BAu$r%Y!<%9$K$7$?%j%>%k%P$G$O!“e(BIPv6e$B$,@h$KJV$C$FMh$k$h$&$K$7$F$$e(B
taca>
e$B$?$H;W$$$^$9!#e(B(e$BJL$K!”$=$&$7$J$1$l$P$$$1$J$$$H$$$&$o$1$G$O$J$/!“4{B8$Ne(B
taca> e$B%j%>%k%P$NF0:n$K9g$o$;$k$H$9$k$J$i!”;29M$K$J$m$&$+$H!#e(B)

[email protected]$K$O%j%>%k%P$H$$$&$h$j!“e(Bgetaddrinfo(3) e$B$N<BAu$G$9$M!#e(B
[email protected]$KJV$9$+$O%]%j%7$NOC$K$J$j$^$9!#e(BAAAA RR
[email protected]$KJV$9$N$O!“e(B
IPv6 [email protected]*$K;H$o$;$h$&$H$$$&0U?^$,$”$k$+$i$G$9!#e(BIPv6
e$BIa5Z$H$$$&[email protected](B
e$B$G$Oe(B AAAA RR
[email protected]$KJV$7$FM_$7$$$H$3$m$G$9$,!”$$$m$$$mLdBj$,5/$-$F$k$N$be(B
e$B;v<B$J$N$G!"G:$^$7$$$H$3$m$G$9!#e(B
RFC 3484
e$B$r<BAu$7$F$$$k4D6-$J$i$=$l$K=>$&$N$,3J9%NI$$$N$G$7$g$&$1$l$I!“e(B
API e$B$,I8=`2=$5$l$F$$$^$;$s$N$G!”?I$$$H$3$m$G$9!#e(B
e$B%/%(%j$r9T$&=g=x$K$D$$$F$O!"e(BAAAA RR [email protected]$K>H2q$9$k$He(B
NXDOMAIN e$B$rJV$7e(B
e$B$F$/$k%@%a$J%5!<%[email protected]$$NCf$K$OB8:_$7$^$9$N$G!"e(BA RR
[email protected]$K>H2q$9$k:#$N<Be(B
e$BAu$NJ}$,NI$$$H;W$$$^$9!#e(B

[email protected]@%$G$9e(B

Takahiro K. wrote:

[email protected]$1$G=q$$$F$$$^$9$,!"@N!9e(Bsendmaile$B$"$?$j$Ne(BMXe$B$rLd$$9g$o$;$k$H$-$N=he(B
e$BM}$GOCBj$K$J$C$F$$$^$7$?!#e(B

e$B$J!<$k$[$I!"0J2<[email protected]$r%3%_%C%H$7$F$*$-$^$7$?!#e(B

Index: lib/resolv.rb

— lib/resolv.rb (e$B%j%S%8%g%se(B 14897)
+++ lib/resolv.rb (e$B%j%S%8%g%se(B 14898)
@@ -387,16 +387,8 @@
# be a Resolv::IPv4 or Resolv::IPv6

 def each_address(name)
  •  buf = []
    
  •  each_resource(name, Resource::IN::ANY) do |resource|
    
  •   case resource.address
    
  •   when Resolv::IPv4
    
  •     yield resource.address
    
  •   when Resolv::IPv6
    
  •     buf << resource.address
    
  •   end
    
  •  end
    
  •  buf.each {|resource| yield resource.address}
    
  •  each_resource(name, Resource::IN::A) {|resource| yield
    

resource.address}

  •  each_resource(name, Resource::IN::AAAA) {|resource| yield
    

resource.address}
end

 ##

In article [email protected],
“NARUSE, Yui” [email protected] writes:

e$B$o$?$7$,5$$K$7$F$$$?$N$Oe(B IPv6 e$B$,JV$C$F$/$k$H%(%i!<$N=P$k%W%m%0%i%`$,$"$ke(B
[email protected]$H!"e(BFLETS.NET e$B$N$h$&$J30$K=P$l$J$$4D6-$G$7$?!#e(B
e$B$1$l$I$b!"e(B Ruby 1.9 e$B$K$*$$$F$OA0<T$O5$$K$J$i$J$$$N$G$7$?!#e(B

resolv.rb e$B$O!"e(BIPv6 e$B$rM%@h$7$J$$$HK\Ev$K:$$k$H$$$&;vNc$,=P$Fe(B
e$B$/$k$^$G$Oe(B IPv4 e$BM%@h$H9M$($F$$$^$9!#e(B

[email protected]@%$G$9!#e(B

Hajimu UMEMOTO wrote:

[email protected]$KJV$9$+$O%]%j%7$NOC$K$J$j$^$9!#e(BAAAA RR [email protected]$KJV$9$N$O!“e(B
IPv6 [email protected]*$K;H$o$;$h$&$H$$$&0U?^$,$”$k$+$i$G$9!#e(BIPv6 e$BIa5Z$H$$$&[email protected](B
e$B$G$Oe(B AAAA RR [email protected]$KJV$7$FM_$7$$$H$3$m$G$9$,!"$$$m$$$mLdBj$,5/$-$F$k$N$be(B
e$B;v<B$J$N$G!"G:$^$7$$$H$3$m$G$9!#e(B
e$B%/%(%j$r9T$&=g=x$K$D$$$F$O!"e(BAAAA RR [email protected]$K>H2q$9$k$He(B NXDOMAIN e$B$rJV$7e(B
e$B$F$/$k%@%a$J%5!<%[email protected]$$NCf$K$OB8:_$7$^$9$N$G!"e(BA RR [email protected]$K>H2q$9$k:#$N<Be(B
e$BAu$NJ}$,NI$$$H;W$$$^$9!#e(B

e$B$o$?$7$,5$$K$7$F$$$?$N$Oe(B IPv6
e$B$,JV$C$F$/$k$H%(%i!<$N=P$k%W%m%0%i%`$,$"$ke(B
[email protected]$H!"e(BFLETS.NET e$B$N$h$&$J30$K=P$l$J$$4D6-$G$7$?!#e(B
e$B$1$l$I$b!"e(B Ruby 1.9 e$B$K$*$$$F$OA0<T$O5$$K$J$i$J$$$N$G$7$?!#e(B

e$B$H$j$"$($:e(B IPv6 Fix e$B$r;29M$K$7$F!“e(B3.4.1 e$B$Ne(B AAAA RR
e$B$NLd$$9g$o$;$r8BDj$9e(B
e$B$k$N$,$$$$$N$G$7$g$&$+!#e(B3.4.2 e$B$K$”$k$h$&$Je(B AAAA
RRe$B$NLd$$9g$o$;$rL5;k$9$ke(B
DNS e$B%5!<%P!<$C$F:#$b$+$J$j$"$k$N$G$9$+$M!&!&!&!)e(B

RFC 3484 e$B$r<BAu$7$F$$$k4D6-$J$i$=$l$K=>$&$N$,3J9%NI$$$N$G$7$g$&$1$l$I!“e(B
API e$B$,I8=`2=$5$l$F$$$^$;$s$N$G!”?I$$$H$3$m$G$9!#e(B

e$B$[!<!"$3$&$$$&$b$N$,$"$k$N$G$9$M!#I8=`2=$5$l$F$$$J$/$F$b%"%/%;%9$5$($G$-e(B
e$B$l$P;H$($ke(B OS
e$B$G$O;H$&$s$G$9$,!&!&!&!#FH<+$G<BAu$9$k$N$b<j4V$G$9$7$M$’!#e(B

Index: lib/resolv.rb

— lib/resolv.rb (revision 14898)
+++ lib/resolv.rb (working copy)
@@ -290,6 +290,12 @@ class Resolv
DNSThreadGroup = ThreadGroup.new

 ##
  • IPv6 is enabled or not

  • IPv6Enabled = Socket.getaddrinfo(Socket.gethostname, nil).
  •  any?{|x| true if x[4] == Socket::AF_INET6 &&
    

!x[3].between?(‘FE8’, ‘FEC’)}
+

  • Creates a new DNS resolver. See Resolv::DNS.new for argument

details.
#
# Yields the created DNS resolver to the block, if given, otherwise
@@ -387,8 +393,12 @@ class Resolv
# be a Resolv::IPv4 or Resolv::IPv6

 def each_address(name)
  •  each_resource(name, Resource::IN::A) {|resource| yield
    

resource.address}

  •  each_resource(name, Resource::IN::AAAA) {|resource| yield
    

resource.address}

  •  if IPv6Enabled
    
  •   each_resource(name, Resource::IN::AAAA) {|resource| yield
    

resource.address}

  •   each_resource(name, Resource::IN::A) {|resource| yield
    

resource.address}

  •  else
    
  •   each_resource(name, Resource::IN::A) {|resource| buf <<
    

resource.address}

  •  end
    

    end

[email protected]@%$G$9!#e(B

Tanaka A. wrote:

In article [email protected],
“NARUSE, Yui” [email protected] writes:

e$B$o$?$7$,5$$K$7$F$$$?$N$Oe(B IPv6 e$B$,JV$C$F$/$k$H%(%i!<$N=P$k%W%m%0%i%`$,$"$ke(B
[email protected]$H!"e(BFLETS.NET e$B$N$h$&$J30$K=P$l$J$$4D6-$G$7$?!#e(B
e$B$1$l$I$b!"e(B Ruby 1.9 e$B$K$*$$$F$OA0<T$O5$$K$J$i$J$$$N$G$7$?!#e(B

resolv.rb e$B$O!"e(BIPv6 e$B$rM%@h$7$J$$$HK\Ev$K:$$k$H$$$&;vNc$,=P$Fe(B
e$B$/$k$^$G$Oe(B IPv4 e$BM%@h$H9M$($F$$$^$9!#e(B

e$B$=$NJ}?K<[email protected]$H;W$&$N$G$9$,!"e(Bresolv.rb
e$B$N<q;]$H$7$Fe(B IPv4 e$B4se(B
e$B$j$H$$$&$3$H$G$9$+!)e(B

[ruby-dev:32933] e$B$N%Q%C%A$rE,MQ$7$?>l9g$G$O!J8=:_L$E,MQ!K!"e(B

  • IPv4 e$B%"%I%l%9$N$_$N%[%9%He(B e$B"*e(B A e$B%l%3!<%I$N$_e(B
  • IPv6 e$B%"%I%l%9$He(B IPv6 e$B%j%s%/%m!<%+%k%"%I%l%9J]M-e(B e$B"*e(B A
    e$B%l%3!<%I$N$_e(B
  • IPv6 e$B%0%m!<%P%k%f%K%-%c%9%H%"%I%l%9J]M-e(B e$B"*e(B AAAA
    e$B%l%3!<%I$He(B A e$B%l%3!<%Ie(B
    e$B$J$N$G!“e(BIPv6
    e$B%”%I%l%9$rA[Dj$7$F$$$J$$%3!<%I0J30$G$OLdBj$O5/$-$J$$$H9M$(e(B
    e$B$F$$$k$N$G$9$,!#e(B

e$B2?G/8e$+$KK~$r;}$7$Fe(B IPv6

e$BM%@h$K$7$?$i$$m$$m%(%i!<$,$H$$$&$N$,I]$$e(B

e$BG_K$G$9!#e(B

On Sun, 6 Jan 2008 19:31:42 +0900
“NARUSE, Yui” [email protected] said:

resolv.rb e$B$O!"e(BIPv6 e$B$rM%@h$7$J$$$HK\Ev$K:$$k$H$$$&;vNc$,=P$Fe(B
e$B$/$k$^$G$Oe(B IPv4 e$BM%@h$H9M$($F$$$^$9!#e(B

naruse> e$B$=$NJ}?K<[email protected]$H;W$&$N$G$9$,!"e(Bresolv.rb
e$B$N<q;]$H$7$Fe(B IPv4 e$B4se(B
naruse> e$B$j$H$$$&$3$H$G$9$+!)e(B

Ruby e$B$K$$1$ke(B resolv.rb
e$B$N0LCVIU$1$,M}2r$G$-$F$$$J$$$N$G$9$,!"$$$o$fe(B
e$B$ke(B Unix e$B7Oe(B OS e$B$G$Ne(B resolver
e$B$O!"%?%$%W$r8F$S=P$7B&$,;XDj$9$k7A$G!"e(BA RR
e$B$He(B AAAA RR e$B$rJ#9gE
$K>H2q$9$k$h$&$J$3$H$O$7$^$;$s!#e(BA RR
e$B$He(B AAAA RR e$B$r>He(B
e$B2q$7$F%^!<%8$7$FJV$9$N$Oe(B netdb e$B$D$^$je(B getaddrinfo(3)
e$B$NLrL$G$9!#e(B
[email protected]$7!"<B:]$K$O!"4{B8$Ne(B resolver API e$B$r;HMQ$7$Fe(B A RR
e$B$He(B AAAA RR e$B$rJL!9e(B
e$B$K%/%(%j$r=P$9$He(B query order problem e$B$r0z$-5/$3$9$?$a!"e(BKAME
e$BM3Mh$Ne(B
*BSD e$B$G$Oe(B resolver e$BAjEv$re(B getaddrinfo(3)
e$B$,Jz$(9~$s$$$^$9!#e(B

e$BG_K$G$9!#e(B

On Sun, 6 Jan 2008 18:20:15 +0900
“NARUSE, Yui” [email protected] said:

naruse> e$B$o$?$7$,5$$K$7$F$$$?$N$Oe(B IPv6
e$B$,JV$C$F$/$k$H%(%i!<$N=P$k%W%m%0%i%`$,$"$ke(B
naruse> [email protected]$H!"e(BFLETS.NET e$B$N$h$&$J30$K=P$l$J$$4D6-$G$7$?!#e(B
naruse> e$B$1$l$I$b!"e(B Ruby 1.9
e$B$K$*$$$F$OA0<T$O5$$K$J$i$J$$$N$G$7$?!#e(B

e$B3N$+!“e(BNTT e$BElF|K$N%U%l%C%D$K4X$7$F$O!“e(BAAAA RR
e$B$N%/%(%j$r%U%l%C%DFb$Ke(B
e$B8BDj$9$ke(B Windows e$BMQ$N%i%$%V%i%j$rG[I[$7$F$$$?$H;W$$$^$9!#e(B NTT [email protected]>F|K\$N%U%l%C%D8w%W%l%_%”%`$G$O!”%V%m!<%I%P%s%I%k!<%?AjEv$,e(B DNS e$B%W%m%-%7$r$7$F$$$^$9$,!"$3$Ne(B DNS e$B%W%m%-%7$Oe(B AAAA RR e$B%/%(%j$r$=$N$^$^DLe(B e$B$7$^$9!#$7$+$7!“e(BNTT [email protected]>F|K\$,G[I[$9$ke(B IPv6 e$B%”%I%l%96u4V0J30$X$Ne(B IPv6 TCP e$B%Q%1%C%H$r%j%;%C%H$9$k;E3]$1$,LVFb$K$"$j!"%0%m!<%P%k$Je(B IPv6
[email protected]\B3e(B
[email protected]$r%f!<%6$,;}$C$F$$$J$$8B$j!“e(BIPv4
e$B$X$N1F6A$,[email protected]$1$J$$$h$&$K9MN8$5e(B
e$B$l$F$$$^$9!#e(B
NGN
e$B$K$D$$$F$O!”@5<0%5!<%S%9$,$I$&[email protected]$NItJ,$,$"$j$^$9$,!“e(BNGN
e$B%U%#!<%k%I%H%i%$%”%k$G$O!"%V%m!<%I%P%s%I%k!<%?AjEv$,e(B DNS
e$B%W%m%-%7$r$7$Fe(B
e$B$*$j!"$3$Ne(B DNS e$B%W%m%-%7$Ge(B AAAA RR
e$B%/%(%j$r%I%m%C%W$7$F$$$k$h$&$G$9!#e(B

naruse> e$B$H$j$"$($:e(B IPv6 Fix e$B$r;29M$K$7$F!“e(B3.4.1 e$B$Ne(B
AAAA RR e$B$NLd$$9g$o$;$r8BDj$9e(B
naruse> e$B$k$N$,$$$$$N$G$7$g$&$+!#e(B3.4.2 e$B$K$”$k$h$&$Je(B AAAA
RRe$B$NLd$$9g$o$;$rL5;k$9$ke(B
naruse> DNS e$B%5!<%P!<$C$F:#$b$+$J$j$"$k$N$G$9$+$M!&!&!&!)e(B

IPv4
[email protected]$1$J$/$9$H$$$&[email protected]$G$O9%$^$7$$$H;W$$$^$9e(B
e$B$,!";d$N8D?ME0U8+$G$O!"$"$/$^$Ge(B hack
e$B46$,6/$/$"$^[email protected]
$K$J$l$^$;$s!#e(B
e$BB>$KNI$$0F$,$"$k$o$1$G$O$J$$$N$G$9$,!#e(B
Windows Vista e$B$Oe(B 3.4.1, 3.4.2 e$B$r<BAu$7$F$$$^$9!#e(B
e$B;d$N%m!<%+%k$N4D6-$G$Oe(B KAME e$B$G$N<BAu$r8=:_$Ne(B FreeBSD
e$B$G;H$($k$h$&$K=$e(B
[email protected]$7$?$b$N$r;}$C$F$$$^$9$,!"%b%d%b%d46$,<h$l$J$$$N$G!"$^[email protected](B commit
e$B$9$ke(B
e$B$K;j$C$F$$$^$;$s!#e(B

RFC 3484 e$B$r<BAu$7$F$$$k4D6-$J$i$=$l$K=>$&$N$,3J9%NI$$$N$G$7$g$&$1$l$I!“e(B
API e$B$,I8=`2=$5$l$F$$$^$;$s$N$G!”?I$$$H$3$m$G$9!#e(B

naruse>
e$B$[!<!"$3$&$$$&$b$N$,$"$k$N$G$9$M!#I8=`2=$5$l$F$$$J$/$F$b%"%/%;%9$5$($G$-e(B
naruse> e$B$l$P;H$($ke(B OS
e$B$G$O;H$&$s$G$9$,!&!&!&!#FH<+$G<BAu$9$k$N$b<j4V$G$9$7$M$’!#e(B

e$B8=>u$Ge(B RFC 3484 e$B$r<BAu$7$F$$$k$N$O!“e(BWindows XP, Windows
Vista,
Solaris, FreeBSD e$B$G$9!#e(B
FreeBSD e$B$N<BAu$Oe(B KAME e$B$N<BAu$r%^!<%8$7$?$b$N$G$9!#e(Blibc
e$B$N30$+$i$O;HMQe(B
e$B$G$-$J$$$h$&$K$7$F$”$j$^$9!#$D$^$j!"e(Bgetaddrinfo(3)
e$B$r;H$C$F$$$k8B$j$O!"e(B
e$BNI$-$K7W$i$&$H$$$&%3%s%;%W%H$G$9!#e(B
Windows, Solaris e$B$Ne(B API
e$B$,$I$&$J$C$F$$$k$N$+GD0.$7$F$$$^$;$s!#e(B

In article [email protected],
“NARUSE, Yui” [email protected] writes:

e$B$=$NJ}?K<[email protected]$H;W$&$N$G$9$,!"e(Bresolv.rb e$B$N<q;]$H$7$Fe(B IPv4 e$B4se(B
e$B$j$H$$$&$3$H$G$9$+!)e(B

e$B$$$^$N$H$3$m$=$&9M$($F$$$^$9!#e(B

OS e$B$Ne(B IPv6 e$BBP1~$,?J$s$G$$$^$9$+$i!"e(BIPv6
e$B$r;H$$$?$1$l$P$=$A$ie(B
e$B$r;H$&$h$&$K$9$k$N$,$$$$$s$8$c$J$$$G$9$+$M!#e(B

resolv.rb e$B$,I,MW$K$J$kLdBj$NCf$G$b$C$H$bBg$-$J$b$N$G$"$k!“L>e(B
e$BA02r7h$N$”[email protected]$N%9%l%C%I$,;_$^$C$F$7$^$&$H$$$&LdBj$Oe(B 1.9
e$B$G$"$l$P2r7h$9$k$N$OFq$7$/$J$$$H;W$$$^$9$7!#e(B(e$B$9$G$K2r7h$7$Fe(B
e$B$k$+$I$&$+$O3NG’$7$F$^$;$s$,e(B)

[ruby-dev:32933] e$B$N%Q%C%A$rE,MQ$7$?>l9g$G$O!J8=:_L$E,MQ!K!"e(B

e$B$<$s$V$O$A$c$s$HM}2r$7$F$$$J$$$h$&$J5$$b$7$^$9$,!":G=i$Ne(B
Socket.gethostname e$B$H$$$&$H$3$m$G$b$&%@%a$G$7$g$&!#e(B

gethostname [email protected]$i$l$kL>A0$He(B IP
e$B%"%I%l%9$KBP1~$9$kL>A0$N4X78$Ce(B
e$B$F1?MQ$G7h$^$k$b$N$G$9$h$M!#e(B

gethostname e$B$N7k2L$+$iD4$Y$F$b!“K\Ev$K$=$N%^%7%s$,$,;}$C$F$$e(B
e$B$k%”%I%l%9$O$o$+$i$J$$$G$7$g$&!#e(B

[email protected]@%$G$9!#e(B

Hajimu UMEMOTO wrote:

Ruby e$B$K$$1$ke(B resolv.rb e$B$N0LCVIU$1$,M}2r$G$-$F$$$J$$$N$G$9$,!"$$$o$fe(B
e$B$ke(B Unix e$B7Oe(B OS e$B$G$Ne(B resolver e$B$O!"%?%$%W$r8F$S=P$7B&$,;XDj$9$k7A$G!"e(BA RR
e$B$He(B AAAA RR e$B$rJ#9gE
$K>H2q$9$k$h$&$J$3$H$O$7$^$;$s!#e(BA RR e$B$He(B AAAA RR e$B$r>He(B
e$B2q$7$F%^!<%8$7$FJV$9$N$Oe(B netdb e$B$D$^$je(B getaddrinfo(3) e$B$NLrL$G$9!#e(B
[email protected]$7!"<B:]$K$O!"4{B8$Ne(B resolver API e$B$r;HMQ$7$Fe(B A RR e$B$He(B AAAA RR e$B$rJL!9e(B
e$B$K%/%(%j$r=P$9$He(B query order problem e$B$r0z$-5/$3$9$?$a!"e(BKAME e$BM3Mh$Ne(B
*BSD e$B$G$Oe(B resolver e$BAjEv$re(B getaddrinfo(3) e$B$,Jz$(9~$s$$$^$9!#e(B

e$B$J$k$[$I!"0lHLE*$JMQES$G$Oe(B socket
e$B$rMQ$$$k$Y$-$J$N$G$7$g$&$M!#e(B

[email protected]@%$G$9!#e(B

Tanaka A. wrote:

resolv.rb e$B$,I,MW$K$J$kLdBj$NCf$G$b$C$H$bBg$-$J$b$N$G$"$k!“L>e(B
e$BA02r7h$N$”[email protected]$N%9%l%C%I$,;_$^$C$F$7$^$&$H$$$&LdBj$Oe(B 1.9
e$B$G$"$l$P2r7h$9$k$N$OFq$7$/$J$$$H;W$$$^$9$7!#e(B(e$B$9$G$K2r7h$7$Fe(B
e$B$k$+$I$&$+$O3NG’$7$F$^$;$s$,e(B)

e$B$9$k$H!“e(Bresolv.rb e$B$Oe(B socket
e$BEy$rMQ$$$?:]$N$$$/$D$+$NLdBj$r2sHr$9$k$?$a$Ne(B
e$B2aEOE*$J%i%$%V%i%j!”$H$$$&$3$H$G$7$g$&$+!#$=$l$J$i$"$($Fe(B IPv6
e$B$X$NBP1~$Oe(B
e$BJ]<iE*$K$7$F$*$$$?J}$,$$$$$+$b$7$l$^$;$s$M!#e(B

[ruby-dev:32933] e$B$N%Q%C%A$rE,MQ$7$?>l9g$G$O!J8=:_L$E,MQ!K!"e(B

e$B$<$s$V$O$A$c$s$HM}2r$7$F$$$J$$$h$&$J5$$b$7$^$9$,!":G=i$Ne(B
Socket.gethostname e$B$H$$$&$H$3$m$G$b$&%@%a$G$7$g$&!#e(B

gethostname [email protected]$i$l$kL>A0$He(B IP e$B%"%I%l%9$KBP1~$9$kL>A0$N4X78$Ce(B
e$B$F1?MQ$G7h$^$k$b$N$G$9$h$M!#e(B

gethostname e$B$N7k2L$+$iD4$Y$F$b!“K\Ev$K$=$N%^%7%s$,$,;}$C$F$$e(B
e$B$k%”%I%l%9$O$o$+$i$J$$$G$7$g$&!#e(B

IPv6 e$B%"%I%l%9$r;}$C$F$$$k$+8+$k$N$O!"e(BIPv6
e$B$r<B:]$K;H$($k$+$H$$$&$h$j$b!“e(B
IPv6
e$B%”%I%l%9$r<[email protected]$9$k$3$H$,4|BT$5$l$k$+$G$7$g$&$N$G!"1?MQ$G7h$^$k$b$Ne(B
e$B$G==J,[email protected]$H;W$$$^$9!#e(B

e$B$5$F$*$-!"e(BAe$B"e(BAAAA e$B$N$^$^$K$7$F$$-$^$9!#e(B

[email protected]@%$G$9!#e(B

Hajimu UMEMOTO wrote:

e$B8BDj$9$ke(B Windows e$BMQ$N%i%$%V%i%j$rG[I[$7$F$$$?$H;W$$$^$9!#e(B NTT [email protected]>F|K\$N%U%l%C%D8w%W%l%_%"%`$G$O!"%V%m!<%I%P%s%I%k!<%?AjEv$,e(B DNS e$B%W%m%-%7$r$7$F$$$^$9$,!"$3$Ne(B DNS e$B%W%m%-%7$Oe(B AAAA RR e$B%/%(%j$r$=$N$^$^DLe(B e$B$7$^$9!#$7$+$7!“e(BNTT [email protected]>F|K\$,G[I[$9$ke(B IPv6 e$B%”%I%l%96u4V0J30$X$Ne(B IPv6 TCP e$B%Q%1%C%H$r%j%;%C%H$9$k;E3]$1$,LVFb$K$"$j!"%0%m!<%P%k$Je(B IPv6 [email protected]\B3e(B
[email protected]$r%f!<%6$,;}$C$F$$$J$$8B$j!“e(BIPv4 e$B$X$N1F6A$,[email protected]$1$J$$$h$&$K9MN8$5e(B
e$B$l$F$$$^$9!#e(B
NGN e$B$K$D$$$F$O!”@5<0%5!<%S%9$,$I$&[email protected]$NItJ,$,$"$j$^$9$,!“e(BNGN
e$B%U%#!<%k%I%H%i%$%”%k$G$O!"%V%m!<%I%P%s%I%k!<%?AjEv$,e(B DNS e$B%W%m%-%7$r$7$Fe(B
e$B$*$j!"$3$Ne(B DNS e$B%W%m%-%7$Ge(B AAAA RR e$B%/%(%j$r%I%m%C%W$7$F$$$k$h$&$G$9!#e(B

e$B$[!<!"$A$g$C$H?4G[$7$F$$$?$N$G$9$,!"$=$l$J$j$KBP:v$O$7$F$$$k$N$G$9$M!#e(B

e$B$K;j$C$F$$$^$;$s!#e(B
e$B$U!<$`!“AGD>$Ke(B A RR e$B”*e(B AAAA RR e$B$,L5Fq$J$N$G$7$g$&$M!#e(B

e$BNI$-$K7W$i$&$H$$$&%3%s%;%W%H$G$9!#e(B
Windows, Solaris e$B$Ne(B API e$B$,$I$&$J$C$F$$$k$N$+GD0.$7$F$$$^$;$s!#e(B

http://www.nttv6.net/dass/ e$B$H$$$&$N$r8+$D$1$?$N$G$9$,!"B>$Ne(B OS
e$B$G$b30$+e(B
e$B$i$O;HMQ$G$-$J$$$h$&$G$9$M!#e(Bgetaddrinfo(3)
e$B$r;H$&$N$,3N<[email protected]$HM}2r$7$F$*e(B
e$B$-$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs