From: | gregoa [...] cpan.org |
Subject: | libnetaddr-ip-perl: ip->addr() should follow RFC5952 Section 2.2 (Zero Compression) |
This bug has been forwarded from http://bugs.debian.org/656605
Package: libnetaddr-ip-perl
Version: 4.058+dfsg-2
Severity: normal
Hi,
libnetaddr-ip-perls ->addr function should follow the recommended representation in RFC5952,
not only print lowercase as default (i have seen the qw(:lower) switch) but also use
maximum zero compression as in 2.2 of the RFC5952:
Show quoted text
--------------------------------------- quote -----------------------------------
2.2. Zero Compression
'A special syntax is available to compress the zeros. The use of
"::" indicates one or more groups of 16 bits of zeros.'
It is possible to select whether or not to omit just one 16-bit 0
field.
2001:db8:aaaa:bbbb:cccc:dddd::1
2001:db8:aaaa:bbbb:cccc:dddd:0:1
In cases where there is more than one field of only zeros, there is a
choice of how many fields can be shortened.
2001:db8:0:0:0::1
2001:db8:0:0::1
2001:db8:0::1
2001:db8::1
In addition, Section 2.2 of [RFC4291] notes,
'The "::" can only appear once in an address.'
This gives a choice on where in a single address to compress the
zero.
2001:db8::aaaa:0:0:1
2001:db8:0:0:aaaa::1
--------------------------------------- quote -----------------------------------
Thanks in advance,
gregor herrmann, Debian Perl Group