A postgresql inet to ip6.arpa snippet

Olipro olipro at 8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa
Wed Jul 27 16:12:47 CEST 2011


On Wednesday 27 Jul 2011 15:03:47 Ignatios Souvatzis wrote:
> On Wed, Jul 27, 2011 at 01:38:13PM +0000, Erik Kline wrote:
> > > The icing on the cake would be to support CIDR for this; i.e. if I
> > > specify 2001:db8::/32 then it becomes 8.b.d.0.1.0.0.2.ip6.arpa
> > 
> > What should it do for a prefix with a CIDR len that doesn't fall on a
> > nibble boundary?  E.g., what should it produce for 2001:db8::/31, and
> > /33?
> 
> Throw an exception.
> 
> 	-is

I disagree here, it should not unequivocally throw an exception, that perhaps 
should be the default behaviour but it should also be possible to have it not 
throw a tantrum and round to the nearest nibble.

thus if someone enters 2001:db8::/31 you round down to /28 (ending up with 
b.d.0.1.0.0.2.ip6.arpa) - I consider this a sensible way of doing things since 
someone could possibly have a non-standard block delegation and your wish 
might be to ascertain the correct DNS SOA  - thus rounding down like this 
ensures you will have that information.


More information about the ipv6-ops mailing list