Skip to content

Commit

Permalink
Stop translating V4MAPPED addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
RaimoNiskanen committed Feb 22, 2018
1 parent ee6d1b9 commit 6a4fb08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions lib/kernel/src/inet_hosts.erl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -72,9 +72,6 @@ gethostbyname(Name, Type, Byname, Byaddr) ->

gethostbyaddr({A,B,C,D}=IP) when ?ip(A,B,C,D) ->
gethostbyaddr(IP, inet);
%% ipv4 only ipv6 address
gethostbyaddr({0,0,0,0,0,16#ffff=F,G,H}) when ?ip6(0,0,0,0,0,F,G,H) ->
gethostbyaddr({G bsr 8, G band 255, H bsr 8, H band 255});
gethostbyaddr({A,B,C,D,E,F,G,H}=IP) when ?ip6(A,B,C,D,E,F,G,H) ->
gethostbyaddr(IP, inet6);
gethostbyaddr(Addr) when is_list(Addr) ->
Expand Down
3 changes: 0 additions & 3 deletions lib/kernel/src/inet_res.erl
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ gethostbyaddr_tm({A,B,C,D} = IP, Timer) when ?ip(A,B,C,D) ->
{ok, HEnt} -> {ok, HEnt};
_ -> res_gethostbyaddr(dn_in_addr_arpa(A,B,C,D), IP, Timer)
end;
%% ipv4 only ipv6 address
gethostbyaddr_tm({0,0,0,0,0,16#ffff,G,H},Timer) when is_integer(G+H) ->
gethostbyaddr_tm({G div 256, G rem 256, H div 256, H rem 256},Timer);
gethostbyaddr_tm({A,B,C,D,E,F,G,H} = IP, Timer) when ?ip6(A,B,C,D,E,F,G,H) ->
inet_db:res_update_conf(),
case inet_db:gethostbyaddr(IP) of
Expand Down

0 comments on commit 6a4fb08

Please sign in to comment.