Browse Source

[2387] Allow comments at the end of DS like string data

Mukund Sivaraman 12 years ago
parent
commit
00d53a3241
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/lib/dns/rdata/generic/detail/ds_like.h

+ 8 - 1
src/lib/dns/rdata/generic/detail/ds_like.h

@@ -79,7 +79,14 @@ public:
 
             constructFromLexer(lexer);
 
-            if (lexer.getNextToken().getType() != MasterToken::END_OF_FILE) {
+            for (MasterToken::Type token_type = lexer.getNextToken().getType();
+                 token_type != MasterToken::END_OF_FILE;
+                 token_type = lexer.getNextToken().getType())
+            {
+                if (token_type == MasterToken::END_OF_LINE) {
+                    continue;
+                }
+
                 isc_throw(InvalidRdataText,
                           "Extra input text for " << RRType(typeCode) << ": "
                           << ds_str);