aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/inet_res_SUITE.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2010-01-28 17:01:00 +0100
committerBjörn Gustavsson <[email protected]>2010-02-09 13:41:42 +0100
commitcc90d8c3642afa626b483b92c53964365d72b35a (patch)
tree64f07e3fe207469ce40a2b55d3e545c213db0091 /lib/kernel/test/inet_res_SUITE.erl
parent51bb4c6ae1e4d61304aee5b4bf77279d838da84a (diff)
downloadotp-cc90d8c3642afa626b483b92c53964365d72b35a.tar.gz
otp-cc90d8c3642afa626b483b92c53964365d72b35a.tar.bz2
otp-cc90d8c3642afa626b483b92c53964365d72b35a.zip
inet:gethostbyname improved to parse IP strings and look up own hostname
Now inet:gethostbyname tries to parse the hostname as an IP string first if the 'native' lookup method is not used. One can also make the IP string parsing explicit using the new 'string' lookup method, or avoid it using the new pseudo lookup method 'nostring'. In R13B04 a bug was introduced when the gethostbyname code was rewritten, so if the native resolver was used and misconfigured to not be able to look up the own hostname, inet:gethostbyname also failed. This is now fixed.
Diffstat (limited to 'lib/kernel/test/inet_res_SUITE.erl')
-rw-r--r--lib/kernel/test/inet_res_SUITE.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl
index 659cfc5988..d8a8d07a18 100644
--- a/lib/kernel/test/inet_res_SUITE.erl
+++ b/lib/kernel/test/inet_res_SUITE.erl
@@ -362,20 +362,20 @@ do_files_monitor(Config) ->
{error,nxdomain} = inet_res:gethostbyname(FQDN),
{ok,{127,0,0,10}} = inet:getaddr("mx.otptest", inet),
{ok,{0,0,0,0,0,0,32512,28}} = inet:getaddr("resolve.otptest", inet6),
- ok = inet_db:res_option(inet6, true),
{ok,#hostent{h_name = Hostname,
h_addrtype = inet6,
h_length = 16,
h_addr_list = [{0,0,0,0,0,0,0,1}]}} =
- inet:gethostbyname(Hostname),
+ inet:gethostbyname(Hostname, inet6),
{ok,#hostent{h_name = FQDN,
h_addrtype = inet6,
h_length = 16,
h_addr_list = [{0,0,0,0,0,0,0,1}]}} =
- inet:gethostbyname(FQDN),
+ inet:gethostbyname(FQDN, inet6),
{error,nxdomain} = inet_res:gethostbyname("resolve"),
%% XXX inet does not honour res_option inet6, might be a problem?
%% therefore inet_res is called here
+ ok = inet_db:res_option(inet6, true),
{ok,#hostent{h_name = "resolve.otptest",
h_addrtype = inet6,
h_length = 16,