[Pdns-users] Exception: unknown escape sequence on NAPTR regex

Peter Fern pdns at obfusc8.org
Tue Aug 5 01:05:41 UTC 2008


Can anyone point me to roughly where I should be looking in the codebase 
to patch this out?  I imagine somewhere in this new universal parser?  I 
assume it will only be a couple of lines to fix, but I don't have the 
spare headspace right now to come to grips with another codebase 
completely - any pointers in the right direction would be a great help.

Peter Fern wrote:
> Hi Bert,
>
> bert hubert wrote:
>> Can you try doubling the \, so:
>>
>> 100 0 "u" "E2U+sip" "!^\\+([0-9][0-9][0-9])$!sip:\\1 at somesiphost.com!" .
>>   
> As I thought - the slashes are returned verbatim when doubled, and 
> cause the parser to barf when there is only one:
>
> Here is the result with a single '\':
>
> mysql> select * from records where id = 47;
> +----+-----------+----------------+-------+-----------------------------------------------------+------+------+-------------+ 
>
> | id | domain_id | name           | type  | 
> content                                             | ttl  | prio | 
> change_date |
> +----+-----------+----------------+-------+-----------------------------------------------------+------+------+-------------+ 
>
> | 47 |         1 | 2.1.1.e164.nts | NAPTR | 100 0 "u" "E2U+target" 
> "!^\+112$!target:SIP/\1!" . |   3600 |    0 |  1216282773 |
> +----+-----------+----------------+-------+-----------------------------------------------------+------+------+-------------+ 
>
>
> # host -t naptr 2.1.1.e164.nts
> Host 2.1.1.e164.nts not found: 3(NXDOMAIN)
>
> Jul 31 16:49:03 ipbx pdns-master[841]: Exception: unknown escape sequence
>
>
> And with a double '\':
>
> mysql> select * from records where id = 47;
> +----+-----------+----------------+-------+-----------------------------------------------------+------+------+-------------+ 
>
> | id | domain_id | name           | type  | 
> content                                             | ttl  | prio | 
> change_date |
> +----+-----------+----------------+-------+-----------------------------------------------------+------+------+-------------+ 
>
> | 47 |         1 | 2.1.1.e164.nts | NAPTR | 100 0 "u" "E2U+target" 
> "!^\\+112$!target:SIP/\\1!" . |   3600 |    0 |  1216282773 |
> +----+-----------+----------------+-------+-----------------------------------------------------+------+------+-------------+ 
>
>
> # host -t naptr 2.1.1.e164.nts
> 2.1.1.e164.nts has NAPTR record 100 0 "u" "E2U+target" 
> "!^\\+112$!target:SIP/\\1!" .
>
>
> Regards,
> Pete
> _______________________________________________
> 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