<div dir="ltr">Hello,<div><br></div><div>I've been playing around with ipv6 in erlang and came across at first strange behaviour in converting string to ipv6 and back</div><div><br></div><div><div>~ --> erl</div><div>Erlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]</div><div><br></div><div>Eshell V7.0  (abort with ^G)</div><div>1>inet:parse_address("2a00:d78::147:94:198:152:68").</div></div><div><div>{ok,{10752,3448,0,327,148,408,338,104}}</div><div>2> inet:ntoa({10752,3448,0,327,148,408,338,104}).</div><div>"2A00:D78:0:147:94:198:152:68"</div><div><br></div><div>If you look closely you will see that there is an extra 0 introduced. This is actually correct. In IETF RFC5952 section 4.2.2 states that a single 0 must not be shortened. This however introduces however the question is the inet:parse_address is actually correct, however it is being friendly to its caller... </div><div><br></div><div>The real issue is however that the addresses are displayed in uppercase which is simply wrong. As RFC5952 clearly states in section 4.3. There is even Errata on this issue that states it must be in lower case.</div><div><br></div><div>The RFC can be found here <a href="https://tools.ietf.org/html/rfc5952">https://tools.ietf.org/html/rfc5952</a> </div><div><br></div></div><div>Kind regards,</div><div>Rik Ribbers</div><div><br></div></div>