NAPTR regex escape issues

This is a discussion on NAPTR regex escape issues within the Bind Users forums, part of the DNS and Related Forums category; Hello, I am having trouble getting BIND to return regular expressions with escaped (meta) characters properly. I have an amount ...


Go Back   Usenet Forums > DNS and Related Forums > Bind Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-27-2005
Ben Turner
 
Posts: n/a
Default NAPTR regex escape issues


Hello,

I am having trouble getting BIND to return regular expressions with
escaped (meta) characters properly. I have an amount of NAPTR records
which contain escaped backslashes (\\) and escaped metachars (i.e. \+).

My problem lies in the fact that double backslashes in a zone file are
returned as such - double backslashes. Single backslashes in the file
are either dropped (i.e. in front of a +) or cause errors when in front
of digits (for regex backreferences such as \1).

For instance i have the following records in my enum.test zone file:

8.7.6.5.4.3.2.1.2.3 IN NAPTR 100 10 "U" "E2U+sip" "!^.*$!sip:\\1@shire.me!"
8.7.6.5.4.3.2.1.2.3 IN NAPTR 100 20 "U" "E2U+sip" "!^\\+(32)(12\\d\\d)(56\\d\\d)$!sip:\\1@\\2-\\3!" .

When queried this returns:

# host -t NAPTR 8.7.6.5.4.3.2.1.2.3.enum.test
8.7.6.5.4.3.2.1.2.3.enum.test NAPTR 100 20 "U" "E2U+sip" "!^.*$!sip:\\1@shire.me!" .
--> \\1 instead of \1 ?
8.7.6.5.4.3.2.1.2.3.enum.test NAPTR 100 50 "U" "E2U+sip" "!^\\+(32)(12\\d\\d)(56\\d\\d)$!sip:\\1@\\2-\\3!" .
--> \\+ instead of \+ ? \\d instead of \d ?

What is the intended behaviour for regular expression escape sequences
in NAPTR records in zone files? Should clients be built to handle the
double backslashes that are returned? Preferably BIND would immedeately
be able to return the correct regex.

Thanks,

Ben

--
Ben Turner (Consultant)
SIEMENS - IC MN D SU
tel: +32 14 252326


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0