[Pdns-users] TXT record with embedded tab causes thread to die.

bert hubert bert.hubert at netherlabs.nl
Tue Mar 27 20:53:00 UTC 2012


On Tue, Mar 27, 2012 at 02:58:30PM -0400, Christopher Pruden wrote:
> Hi Ruben,
> 
> Is the record that you show with a tab, or the '>' sign?  The issue I'm running into is with an embedded tab, it got mixed up a bit in the email.

Hi Christopher,

Together with Ruben we've diagnosed & reproduced this bug, leading to the
solution in http://wiki.powerdns.com/trac/changeset/2539

I have also made new builds for 2359 for 64 bit platforms and source on
http://powerdnssec.org/downloads/ and
http://powerdnssec.org/downloads/packages

32 bit builds are compiling right now.

Thank you for reporting this issue! I hope you will find that 2539 contains
your fix.

Kind regards,

Bert

-- 
PowerDNS Website: http://www.powerdns.com/
PowerDNS Community Website: http://wiki.powerdns.com/
PowerDNS is supported and developed by Netherlabs: http://www.netherlabs.nl

> 
> Here's what the records table looks like:
> 
> \d+ dns_record;
>                                            Table "public.dns_record"
>    Column    |          Type           |                        Modifiers                        | Description 
> -------------+-------------------------+---------------------------------------------------------+-------------
>  id          | integer                 | not null default nextval('dns_record_id_seq'::regclass) | 
>  zone_id     | integer                 |                                                         | 
>  name        | character varying(255)  |                                                         | 
>  type        | character varying(10)   |                                                         | 
>  rdata       | character varying(4096) |                                                         | 
>  ttl         | integer                 |                                                         | 
>  prio        | integer                 |                                                         | 
>  change_date | integer                 |                                                         | 
> Indexes:
>     "dns_record_pkey" PRIMARY KEY, btree (id)
>     "nametype_index" btree (name, "type")
>     "rec_name_index" btree (name)
>     "zone_id" btree (zone_id)
> Foreign-key constraints:
>     "domain_exists" FOREIGN KEY (zone_id) REFERENCES dns_zone(id) ON DELETE CASCADE
> Has OIDs: no
> 
> 
> On Mar 27, 2012, at 2:35 PM, Ruben d'Arco wrote:
> 
> > Hi Chris,
> > 
> > I've tried to reproduce your issue with the latest PDNS. Here's my record:
> > pdnstest=> select * from records where id=20172;
> >  id   | domain_id |      name      | type |             content              | ttl  | prio | change_date | ordername | auth
> > -------+-----------+----------------+------+----------------------------------+------+------+-------------+-----------+------
> > 20172 |         3 | text.wtest.com | TXT  | "v=spf1 a mx ip4:127.0.0.1>?all" | 3600 |      |             |           |
> > (1 row)
> > 
> > 
> > This is the result of my dig for that record:
> > $ dig -p 5300 @127.0.0.2 TXT text.wtest.com +short
> > "v=spf1 a mx ip4:127.0.0.1>?all"
> > 
> > Could you provide us with some more information about your postgresql database and the output of '\d+ records' ?
> > 
> > Kind regards,
> > 	Ruben
> > 
> > 
> > 
> > 
> > 
> > On Tue, Mar 27, 2012 at 11:09:29AM -0400, Christopher Pruden wrote:
> >>>> On Tue, Mar 27, 2012 at 09:43:27AM -0400, Christopher Pruden wrote:
> >>>>> Hi,
> >>>>> 
> >>>>> I'm working on a PowerDNS setup, with the gpgsql backend, and think I'm running into ticket #356.  I tried this with 3.0.1 initially, and now 3.1rc1 (static RPM for both).
> >>>>> 
> >>>>> Initially, data was loaded by setting PowerDNS as a slave to a bind master, and using AXFR to get everything across.  This seemed to work well, although I've found a few records that ended up in the DB that can't be retrieved.  Specifically, it seems to be TXT records with an embedded tab (the greater than sign is the tab):
> >> 
> >> I believe I've found the spot that is causing this issue.  I haven't tested this patch, as I've run into trouble getting PowerDNS to compile on Cent, but I believe the below patch (against svn) would take care of it.  I suspect there are other characters that should be handled in it as well though -- vertical tab, maybe \r, etc.
> >> 
> >> 
> >> Index: pdns/dnsparser.cc
> >> ===================================================================
> >> --- pdns/dnsparser.cc	(revision 2538)
> >> +++ pdns/dnsparser.cc	(working copy)
> >> @@ -393,6 +393,9 @@
> >>     if(*i=='\n') {  // XXX FIXME this should do a way better job!
> >>       ret += "\\010";
> >>     }
> >> +    else if(*i=='\t') {
> >> +      ret += "\\009";
> >> +    }
> >>     else if(*i=='"' || *i=='\\'){
> >>       ret += '\\';
> >>       ret += *i;
> >> 
> >> 
> >> _______________________________________________
> >> Pdns-users mailing list
> >> Pdns-users at mailman.powerdns.com
> >> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> > _______________________________________________
> > Pdns-users mailing list
> > Pdns-users at mailman.powerdns.com
> > http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 



More information about the Pdns-users mailing list