]> granicus.if.org Git - pdns/commitdiff
this makes the pdns_recursor able to serve the root zone unmodified, for keeping...
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 25 Mar 2010 21:29:16 +0000 (21:29 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 25 Mar 2010 21:29:16 +0000 (21:29 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1547 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/rcpgenerator.cc

index 26e261b02a49f9a15e9797bf65471d746ad3d113..dfaffd114fbbc1f03875414d3503d92ca236331d 100644 (file)
@@ -254,9 +254,19 @@ void RecordTextReader::xfrText(string& val, bool multi)
       val.append(1, ' ');
 
     skipSpaces();
-    if(d_string[d_pos]!='"')
+    if(d_string[d_pos]!='"') { // special case 'plenus' - without quotes
+      string::size_type pos = d_pos;
+      while(pos != d_end && isalnum(d_string[pos]))
+        pos++;
+      if(pos == d_end) {
+        val.append(1, '"');
+        val.append(d_string.c_str() + d_pos, d_end - d_pos);
+        val.append(1, '"');
+        d_pos = d_end;
+        break;
+      }
       throw RecordTextException("Data field in DNS should start with quote (\") at position "+lexical_cast<string>(d_pos)+" of '"+d_string+"'");
-
+    }
     val.append(1, '"');
     while(++d_pos < d_end && d_string[d_pos]!='"') {
       if(d_string[d_pos]=='\\' && d_pos+1!=d_end) {