Hello Grant,

>> _http._tcp.dns-sd.org.       60      IN      PTR 
>> \\\032*\\\032Amazon.com,\\\032on-line\\\032shopping._http._tcp.dns-sd.org.
>> 
>> Just wondering if anybody has seen this before.
> 
> _http._tcp.dns-sd.org.        59      IN      PTR     Stuart\226\128\153s.
> _http._tcp.dns-sd.org.        59      IN      PTR     *.

Please see the patch below. It fixes this issue, but it has not seen extensive 
testing. We hope to include it in the PowerDNS SVN soon, if it stands up to 
scrutiny.

--- ../dns.cc   2011-10-15 14:54:00.084284349 +0200
+++ dns.cc      2011-10-30 08:13:44.133816786 +0100
@@ -10,7 +10,7 @@ static void appendEscapedLabel(string& r
 {
   unsigned char n = 0;
   for(n = 0 ; n < labellen; ++n)
-    if(begin[n] == '.' || begin[n] == '\\')
+    if(begin[n] == '.' || begin[n] == '\\' || begin[n] == ' ')
       break;
   
   if( n == labellen) {
@@ -20,6 +20,7 @@ static void appendEscapedLabel(string& r
   string label(begin, labellen);
   boost::replace_all(label, "\\",  "\\\\");
   boost::replace_all(label, ".",  "\\.");
+  boost::replace_all(label, " ",  "\\032");
   ret.append(label);
 }
 

Kind regards,
Peter van Dijk


_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to