aboutsummaryrefslogtreecommitdiffstats
path: root/lib/resolv.rb
Commit message (Collapse)AuthorAgeFilesLines
* * resolv.rb (Resolv::DNS): use the same DNS server when retry using TCP.akr2010-11-271-4/+3
| | | | | | | reported by Julian Mehnle. [ruby-core:32970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: retry via TCP if UDP reply is truncated.akr2010-10-291-3/+20
| | | | | | | fixed by Julian Mehnle. [ruby-core:32407] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester#request): rescue ECONNRESETakr2010-05-311-1/+2
| | | | | | | for Windows. reported by U.Nakamura. [ruby-dev:41477] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester#request): rescue ECONNREFUSED.akr2010-05-291-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::IPv4::Regex): make it only accept 0 to 255.akr2010-04-181-1/+5
| | | | | | | [ruby-core:29501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fix [ruby-core:28320] reported by Paul Clegg.akr2010-02-241-1/+5
| | | | | | | | (Resolv::DNS::Requester#request): raise ResolvTimeout consistently for timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fix [ruby-core:28144].akr2010-02-111-33/+59
| | | | | | | | | | | | | | | | | | | | | | | | | (Resolv::DNS#make_requester): pass nameserver_port to UnconnectedUDP.new. (Resolv::DNS.bind_random_port): change the is_ipv6 argument to bind_host. (Resolv::DNS::Requester#initialize): change instance variable to store multiple sockets. (Resolv::DNS::Requester#request): pass readable sockets to recv_reply. (Resolv::DNS::Requester#close): close all sockets. (Resolv::DNS::Requester::UnconnectedUDP#initialize): allocate a socket for each address family of name servers. (Resolv::DNS::Requester::UnconnectedUDP#recv_reply): read from the passwd readable socket. (Resolv::DNS::Requester::UnconnectedUDP#sender): use appropriate socket for the target nameserver. (Resolv::DNS::Requester::ConnectedUDP): follow the instance variable change. (Resolv::DNS::Requester::TCP#sender): ditto. (Resolv::DNS::Config#nameserver_port): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::Config.default_config_hash): return annobu2010-01-191-1/+1
| | | | | | | empty hash when resolv.conf is not available. [ruby-core:27620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Config#lazy_initialize): fixed thenobu2010-01-191-1/+1
| | | | | | | defaults of nameserver and port. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2010-01-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#inspect):akr2010-01-021-2/+9
| | | | | | | implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS#initialize): new option :nameserver_port.akr2010-01-021-17/+39
| | | | | | | | | | | | | | (Resolv::DNS#each_resource): pass port number. (Resolv::DNS#make_requester): ditto. (Resolv::DNS::Config#lazy_initialize): initialize @nameserver_port instead of @nameserver. (Resolv::DNS::Config#single?): return port number addition to the nameserver. (Resolv::DNS::Config#generate_timeouts): use @nameserver_port. (Resolv::DNS::Config#resolv): yield port number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP): disableakr2009-10-091-1/+3
| | | | | | | | reverse lookup. (Resolv::DNS::Requester::UnconnectedUDP): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS.bind_random_port): bind to "::" for IPv6.akr2009-10-061-4/+5
| | | | | | | | | (Resolv::DNS::ConnectedUDP#initialize): specify is_ipv6 argument of bind_random_port. [ruby-core:25970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcodednobu2009-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | platform names. * lib/resolv.rb (Resolv::Hosts::DefaultFileName), (Resolv::DNS::Config.default_config_hash): tries win32/resolv on mswin64 too. * lib/rubygems/specification.rb (Gem::Specification#ruby_code): aded mswin64. * lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command): spawn is better to start a process in background. * ext/extmk.rb: uses FNM_SYSCASE. * instruby.rb: installs win32.h on mswin64 platform. [ruby-core:21722] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix rdoc.akr2009-01-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS#each_address): don't query IPv6 addressakr2009-01-311-1/+13
| | | | | | | if the host has no global IPv6 address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trailing spaces removed.akr2008-09-141-20/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: randomize source port and transaction id.akr2008-08-081-118/+159
| | | | | | | | | | CVE-2008-1447. * lib/resolv-replace.rb (UDPSocket#bind): don't resolv host if host is "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc.rb: massive spelling correction patch from Evan Farrarmatz2008-06-041-2/+2
| | | | | | <evanfarrar at gmail.com> in [ruby-doc:1382] applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::Config.default_config_hash): requiresnobu2008-03-311-0/+1
| | | | | | | win32/resolv to use Win32::Resolv. [ruby-dev:34138] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::Hosts): should not use win32/resolv on cygwin.nobu2008-03-211-1/+1
| | | | | | | | | | | | [ruby-dev:29945], [ruby-dev:34095] * lib/win32/registry.rb (Win32::Registry.expand_environ): try upcased name too for cygwin. [ruby-dev:29945] * lib/win32/resolv.rb (Win32::Resolv.get_hosts_path): use expand_path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Reolv::DNS#each_address): get A record and then AAAAnaruse2008-01-051-10/+2
| | | | | | | record. [ruby-dev:32925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS#each_address): now returns IPv6 address.naruse2007-12-281-3/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Name.==): fix for other is array ofnaruse2007-12-261-3/+3
| | | | | | | | | | | | Resolv::DNS::Label::Str. * lib/resolv.rb (Resolv::DNS::MessageEncoder#put_label): String#string is not defined, so replace to_s. * lib/resolv.rb (Resolv::IPv6#to_name): ip6.int is obsoleted by ip6.arpa. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_string):matz2006-08-081-2/+3
| | | | | | | | | | affected by str[0] returns 1 char string. [ruby-dev:29223] * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_labels): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize):akr2006-05-071-1/+1
| | | | | | | | Use AF_INET6 for nameservers containing colons. patch by Stephan Maka. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler):matz2006-02-201-8/+12
| | | | | | | | | | qualify the access for Config constant. [ruby-dev:28338] * lib/resolv.rb (Resolv::DNS::Resource::IN::A): qualify ClassValue. [ruby-dev:28338] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Resource#ttl): new attribute.akr2005-06-151-7/+22
| | | | | | | | | | | (Resolv::DNS::Resource#==): ignore @ttl. (Resolv::DNS::Resource#hash): ditto. (Resolv::DNS::Message::MessageDecoder#get_rr): save TTL in a Resource object. based on [ruby-core:5190] by Eric Hodel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added Eric Hodel's rdoc to resolv.rb and added file to .documentryan2005-06-091-319/+636
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Name#subdomain_of?): new method.akr2005-02-071-0/+31
| | | | | | | | (Resolv::DNS::Name#inspect): ditto. Suggested by Sam Roberts. [ruby-talk:129086] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Resource::TXT): multiple strings was notakr2005-02-051-6/+24
| | | | | | | | | | | | handled. (Resolv::DNS::Resource::TXT#strings): new method to return all strings. (Resolv::DNS::Message::MessageEncoder#put_string_list): new method. (Resolv::DNS::Message::MessageDecoder#get_string_list): ditto. based on [ruby-talk:129732] by Sam Roberts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* example modified a bit.akr2005-01-291-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Resource::IN::SRV): Added RFC2782 SRVakr2005-01-291-0/+58
| | | | | | | resource record for specifying location of services. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Config.parse_resolv_conf):akr2005-01-281-0/+10
| | | | | | | | | | | parse options line for ndots option. (Resolv::Hosts#lazy_initialize): return self. (Resolv::DNS#lazy_initialize): ditto. (Resolv::DNS::Config#lazy_initialize): ditto. Suggested by Sam Roberts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Config.resolv): don't raise ResolvError.akr2005-01-211-3/+1
| | | | | | | reported by Sam Roberts. [ruby-talk:127133] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Config.parse_resolv_conf): ignoreakr2005-01-181-0/+2
| | | | | | | | domain and search directive without an argument. reported by Sam Roberts. [ruby-talk:126781] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Config.default_config_hash): when multiple domainsusa2004-08-231-1/+1
| | | | | | | are set, Win32::Resolv.get_resolv_info returns Array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Config): make it configurable withoutakr2004-05-121-35/+92
| | | | | | | external file such as /etc/resolv.conf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: don't use Regexp#source to embed regexps.akr2004-04-231-5/+5
| | | | | | | [ruby-dev:23432] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * exception message clean-up by Ian Macdonald <ian@caliban.org>.matz2004-03-291-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* consistent parentheses in assignment RHS.matz2003-10-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/Win32API/lib/win32/resolv.rb: added.usa2003-07-241-41/+51
| | | | | | | * lib/resolv.rb: support Win32 platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::Resource#hash): use XOR to accumulateakr2003-04-211-3/+3
| | | | | | | | | | | hash value. * lib/tsort.rb (TSort#each_strongly_connected_component): don't use block argument. (each_strongly_connected_component_from): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Object#class instead of deprecated Object#type.nobu2002-10-021-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::open, close): new.nobu2002-07-121-17/+41
| | | | | | | * lib/optparse.rb, lib/optparse: import. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: untaint strings read from /etc/hosts andshugo2002-07-111-0/+6
| | | | | | | /etc/resolv.conf to prevent SecurityError when $SAFE==1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* modify document.akr2002-04-181-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: fix arguments to create exceptions.akr2002-03-221-2/+2
| | | | | | | Patch from matt@lickey.com. (ruby-bugs:PR#278) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: don't complete domains for absolute FQNs.akr2002-03-121-30/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e