hi,
Mark.Andrews@isc.org wrote:
> Is the following a legal IPv6 literal? The RFC's are unclear
> about whether leading zeros are allowed or not if they would
> make a segment more than 4 character wide.
>
> 1234:1234:1234:1234:01234::
defensive programming may consider this as a
valid address.
However, when this address is stored in buffers
of limited size, it would overflow as most
buffers assume 46 as the max size of an ipv6
address string. open group suggests this bufsz.
> Note I would never expect inet_ntop() to produce the above.
neither would I.
> We were discussing this when reviewing our inet_pton()
> implementation.
I would prefer to code inet_pton to accept this
address. because there is a possibility that
some 'ill written' scripts may produce such
ip addresses. scripts get preference because
handwriting ipv6 addresses is a nightmare at
present.
Also moving on to IPv6 applications do not
want to call inet_pton and but expect
getaddrinfo to validate the v6 address.
the expectation is that, APIs provide more
options to simplify application coding.
regs
ramanan
> Mark
>
> > --------------------------------------------------------------------
> > IETF IPng Working Group Mailing List
> > IPng Home Page: http://playground.sun.com/ipng
> > FTP archive: ftp://playground.sun.com/pub/ipng
> > Direct all administrative requests to majordomo@sunroof.eng.sun.com
> > --------------------------------------------------------------------
> --
> Mark Andrews, Internet Software Consortium
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742 INTERNET: Mark.Andrews@isc.org
> --------------------------------------------------------------------
> IETF IPng Working Group Mailing List
> IPng Home Page: http://playground.sun.com/ipng
> FTP archive: ftp://playground.sun.com/pub/ipng
> Direct all administrative requests to majordomo@sunroof.eng.sun.com
> --------------------------------------------------------------------
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page: http://playground.sun.com/ipng
FTP archive: ftp://playground.sun.com/pub/ipng
Direct all administrative requests to majordomo@sunroof.eng.sun.com
--------------------------------------------------------------------