]> granicus.if.org Git - pdns/commitdiff
IPv6 addresses can also include a . it appears (::ffff) - closes 1663
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 2 Sep 2014 14:26:00 +0000 (16:26 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 2 Sep 2014 14:27:42 +0000 (16:27 +0200)
pdns/rcpgenerator.cc

index 59702b4b9a338fb0895d53053fc66070379b42ff..4db2ae61201905c63aba2d89a29da6791fc81839 100644 (file)
@@ -135,9 +135,9 @@ void RecordTextReader::xfrIP6(std::string &val)
   skipSpaces();
   
   size_t len;
-  // lookup end of value
+  // lookup end of value - think of ::ffff encoding too, has dots in it!
   for(len=0; 
-    d_pos+len < d_string.length() && (isxdigit(d_string.at(d_pos+len)) || d_string.at(d_pos+len) == ':');
+      d_pos+len < d_string.length() && (isxdigit(d_string.at(d_pos+len)) || d_string.at(d_pos+len) == ':' || d_string.at(d_pos+len)=='.');
     len++);
 
   if(!len)