aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2017-06-07 10:10:39 +0200
committerRaimo Niskanen <[email protected]>2017-06-07 15:36:20 +0200
commit33ed2e24a516e1024fa984a96ddab90a01a97475 (patch)
tree8338da752c18b5614039dd83ae2dd81468c79bcb /lib/kernel/src
parent95ebfa0b19bd4b1cac8a0eb98e775517ebb2ca6d (diff)
downloadotp-33ed2e24a516e1024fa984a96ddab90a01a97475.tar.gz
otp-33ed2e24a516e1024fa984a96ddab90a01a97475.tar.bz2
otp-33ed2e24a516e1024fa984a96ddab90a01a97475.zip
Adjust inet:ntoa/1 to RFC5952, but not deeper
There are a multitude of RFC:s that point to each other and some of them suggest different addresses with IPv4 suffixes. Use the IPv4 suffix text representation only for the old well known ::a.b.c.d and ::ffff:a.b.c.d prefixes. The others seems to be moving targets.
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/inet_parse.erl6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/kernel/src/inet_parse.erl b/lib/kernel/src/inet_parse.erl
index f150521e92..06e1048afe 100644
--- a/lib/kernel/src/inet_parse.erl
+++ b/lib/kernel/src/inet_parse.erl
@@ -715,12 +715,6 @@ ntoa({0,0,0,0,0,0,A,B}) -> "::" ++ dig_to_dec(A) ++ "." ++ dig_to_dec(B);
%% IPV4 non ipv6 host address
ntoa({0,0,0,0,0,16#ffff,A,B}) ->
"::ffff:" ++ dig_to_dec(A) ++ "." ++ dig_to_dec(B);
-%% RFC 2765 IPv4-translated address
-ntoa({0,0,0,0,16#ffff,0,A,B}) ->
- "::ffff:0:" ++ dig_to_dec(A) ++ "." ++ dig_to_dec(B);
-%% RFC 6052 Well-known Prefix address
-ntoa({16#64,16#ff9b,0,0,0,0,A,B}) ->
- "64:ff9b::" ++ dig_to_dec(A) ++ "." ++ dig_to_dec(B);
ntoa({_,_,_,_,_,_,_,_}=T) ->
%% Find longest sequence of zeros, at least 2, to replace with "::"
ntoa(tuple_to_list(T), []);