[Pkg-pdns-maintainers] Bug#707761: pdns-backend-pgsql: IP fields too short for master/slave operation over IPv6

James Cloos cloos at jhcloos.com
Wed Oct 2 17:04:20 UTC 2013


>>>>> "MH" == Marc Haber <mh+debian-packages at zugschlus.de> writes:

>> alter table supermasters alter COLUMN ip type inet using ip::inet;

>> and change the sql which creates the table during install to use inet
>> for that column.

MH> Can pdns handle that table format?

It is transparent to pdns.  I've been using it in production since
before I posted that.

Were pdns to try to store something in that column which wasn't an ip
address, pg would complain and the transaction would fail.

But pdns only reads that table, and the text returned from a SELECT on
an inet column looks like the normal text notation of an ipv4 or ipv6
address.

Were someone to store a cidr (such as 10.1.2.4/8) then pdns would
complain; but again the result would be no different than if one
were to store such data in a text or varchar field.

The column needs to be either text, varchar(39) or larger, or inet
to support all possible ipv4 and ipv6 addresses.  Inet has the benefit
of documenting the column's intent and rejecting most bogus data before
it can confuse or break pdns.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



More information about the Pkg-pdns-maintainers mailing list