diff options
author | Raimo Niskanen <[email protected]> | 2018-02-13 10:14:22 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-02-13 10:14:22 +0100 |
commit | ee6d1b9a61d8f2f087f0f3bf3ea2b933b5c3a93a (patch) | |
tree | d9e9a8021e47352abbf5215b4244a810709a52a2 /lib/kernel/src/inet_res.erl | |
parent | 82e5a5df18e21e4220e51d89c666d1da70f12ec1 (diff) | |
download | otp-ee6d1b9a61d8f2f087f0f3bf3ea2b933b5c3a93a.tar.gz otp-ee6d1b9a61d8f2f087f0f3bf3ea2b933b5c3a93a.tar.bz2 otp-ee6d1b9a61d8f2f087f0f3bf3ea2b933b5c3a93a.zip |
Stop returning V4MAPPED addresses
Diffstat (limited to 'lib/kernel/src/inet_res.erl')
-rw-r--r-- | lib/kernel/src/inet_res.erl | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/lib/kernel/src/inet_res.erl b/lib/kernel/src/inet_res.erl index 49aa5f8bda..58017c62fb 100644 --- a/lib/kernel/src/inet_res.erl +++ b/lib/kernel/src/inet_res.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2016. All Rights Reserved. +%% Copyright Ericsson AB 1997-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -431,28 +431,7 @@ gethostbyname(Name,Family,Timeout) -> gethostbyname_tm(Name,inet,Timer) -> getbyname_tm(Name,?S_A,Timer); gethostbyname_tm(Name,inet6,Timer) -> - case getbyname_tm(Name,?S_AAAA,Timer) of - {ok,HEnt} -> {ok,HEnt}; - {error,nxdomain} -> - case getbyname_tm(Name, ?S_A,Timer) of - {ok, HEnt} -> - %% rewrite to a ipv4 only ipv6 address - {ok, - HEnt#hostent { - h_addrtype = inet6, - h_length = 16, - h_addr_list = - lists:map( - fun({A,B,C,D}) -> - {0,0,0,0,0,16#ffff,A*256+B,C*256+D} - end, HEnt#hostent.h_addr_list) - }}; - Error -> - Error - end; - Error -> - Error - end; + getbyname_tm(Name,?S_AAAA,Timer); gethostbyname_tm(_Name, _Family, _Timer) -> {error, einval}. |