BIND 10 trac2387, updated. 22362bbf67afbd7851f731f6bbd337333267a939 [2387] Don't support trailing comments in DNSKEY string constructor
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Mar 11 03:29:06 UTC 2013
The branch, trac2387 has been updated
via 22362bbf67afbd7851f731f6bbd337333267a939 (commit)
via fdfe820d25fc0ac6b8258a448fd9188d4e1f7090 (commit)
from 167b544c41361a7cf316b042baf057afb9002d3b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 22362bbf67afbd7851f731f6bbd337333267a939
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Mar 11 08:58:21 2013 +0530
[2387] Don't support trailing comments in DNSKEY string constructor
This commit also disables some masterLoad() tests that should be fixed
as apart of #2381.
commit fdfe820d25fc0ac6b8258a448fd9188d4e1f7090
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Mar 11 08:49:38 2013 +0530
Revert "[2387] Allow comments at the end of DS like string data"
This reverts commit 00d53a32412c50c20c573f40d895e8ad7f74ad4f.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/rdata/generic/detail/ds_like.h | 9 +--------
src/lib/dns/rdata/generic/dnskey_48.cc | 11 +----------
src/lib/dns/tests/masterload_unittest.cc | 24 ++++++++++++++++++++----
3 files changed, 22 insertions(+), 22 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/rdata/generic/detail/ds_like.h b/src/lib/dns/rdata/generic/detail/ds_like.h
index 4f742b9..a7bebbf 100644
--- a/src/lib/dns/rdata/generic/detail/ds_like.h
+++ b/src/lib/dns/rdata/generic/detail/ds_like.h
@@ -79,14 +79,7 @@ public:
constructFromLexer(lexer);
- 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;
- }
-
+ if (lexer.getNextToken().getType() != MasterToken::END_OF_FILE) {
isc_throw(InvalidRdataText,
"Extra input text for " << RRType(typeCode) << ": "
<< ds_str);
diff --git a/src/lib/dns/rdata/generic/dnskey_48.cc b/src/lib/dns/rdata/generic/dnskey_48.cc
index f269ccf..ada8880 100644
--- a/src/lib/dns/rdata/generic/dnskey_48.cc
+++ b/src/lib/dns/rdata/generic/dnskey_48.cc
@@ -61,16 +61,7 @@ DNSKEY::DNSKEY(const std::string& dnskey_str) :
constructFromLexer(lexer);
- // This elaborate check is done to allow trailing comments in
- // the string.
- 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;
- }
-
+ if (lexer.getNextToken().getType() != MasterToken::END_OF_FILE) {
isc_throw(InvalidRdataText,
"Extra input text for DNSKEY: " << dnskey_str);
}
diff --git a/src/lib/dns/tests/masterload_unittest.cc b/src/lib/dns/tests/masterload_unittest.cc
index 7f1961c..c0f5d61 100644
--- a/src/lib/dns/tests/masterload_unittest.cc
+++ b/src/lib/dns/tests/masterload_unittest.cc
@@ -167,7 +167,11 @@ TEST_F(MasterLoadTest, loadRRsigs) {
EXPECT_EQ(2, results.size());
}
-TEST_F(MasterLoadTest, loadRRWithComment) {
+// This test was disabled by #2387, because the test data has trailing
+// comments and it (eventually) uses the string RDATA constructor which
+// doesn't support them. This test should be fixed and re-enabled by
+// ##2381, or deleted.
+TEST_F(MasterLoadTest, DISABLED_loadRRWithComment) {
// Comment at the end of line should be ignored and the RR should be
// accepted.
rr_stream << "example.com. 3600 IN DNSKEY 256 3 7 "
@@ -180,7 +184,11 @@ TEST_F(MasterLoadTest, loadRRWithComment) {
dnskey_rdata)));
}
-TEST_F(MasterLoadTest, loadRRWithCommentNoSpace) {
+// This test was disabled by #2387, because the test data has trailing
+// comments and it (eventually) uses the string RDATA constructor which
+// doesn't support them. This test should be fixed and re-enabled by
+// ##2381, or deleted.
+TEST_F(MasterLoadTest, DISABLED_loadRRWithCommentNoSpace) {
// Similar to the previous one, but there's no space before comments.
// It should still work.
rr_stream << "example.com. 3600 IN DNSKEY 256 3 7 "
@@ -193,7 +201,11 @@ TEST_F(MasterLoadTest, loadRRWithCommentNoSpace) {
dnskey_rdata)));
}
-TEST_F(MasterLoadTest, loadRRWithCommentEmptyComment) {
+// This test was disabled by #2387, because the test data has trailing
+// comments and it (eventually) uses the string RDATA constructor which
+// doesn't support them. This test should be fixed and re-enabled by
+// ##2381, or deleted.
+TEST_F(MasterLoadTest, DISABLED_loadRRWithCommentEmptyComment) {
// Similar to the previous one, but there's no data after the ;
// It should still work.
rr_stream << "example.com. 3600 IN DNSKEY 256 3 7 "
@@ -206,7 +218,11 @@ TEST_F(MasterLoadTest, loadRRWithCommentEmptyComment) {
dnskey_rdata)));
}
-TEST_F(MasterLoadTest, loadRRWithCommentEmptyCommentNoSpace) {
+// This test was disabled by #2387, because the test data has trailing
+// comments and it (eventually) uses the string RDATA constructor which
+// doesn't support them. This test should be fixed and re-enabled by
+// ##2381, or deleted.
+TEST_F(MasterLoadTest, DISABLED_loadRRWithCommentEmptyCommentNoSpace) {
// Similar to the previous one, but there's no space before or after ;
// It should still work.
rr_stream << "example.com. 3600 IN DNSKEY 256 3 7 "
More information about the bind10-changes
mailing list