BIND 10 master, updated. d3c971ea33bbcb43f2c66207a04eab43c91399e6 [master Merge branch 'trac3362'
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Mar 11 12:31:41 UTC 2014
The branch, master has been updated
via d3c971ea33bbcb43f2c66207a04eab43c91399e6 (commit)
via c943bd48201e4ebb5608c986fd7543fa828f4ee4 (commit)
via 72d508acc50c642e4958937532b3728bdccf5a75 (commit)
from 5a65fffe5a61fa87e8af0778e8859b6cb1ab796c (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 d3c971ea33bbcb43f2c66207a04eab43c91399e6
Merge: 5a65fff c943bd4
Author: Thomas Markwalder <tmark at isc.org>
Date: Tue Mar 11 08:23:36 2014 -0400
[master Merge branch 'trac3362'
b10-dhcp-ddns now checks for NXRRSET on DNS removal, rather than NXDOMAIN
-----------------------------------------------------------------------
Summary of changes:
src/bin/d2/nc_remove.cc | 25 +++++++++++++++----------
src/bin/d2/tests/nc_remove_unittests.cc | 12 ++++++------
2 files changed, 21 insertions(+), 16 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/d2/nc_remove.cc b/src/bin/d2/nc_remove.cc
index 864b8d7..5eb0521 100644
--- a/src/bin/d2/nc_remove.cc
+++ b/src/bin/d2/nc_remove.cc
@@ -214,9 +214,11 @@ NameRemoveTransaction::removingFwdAddrsHandler() {
switch (getDnsUpdateStatus()) {
case DNSClient::SUCCESS: {
// We successfully received a response packet from the server.
+ // The RCODE will be based on a value-dependent RRset search,
+ // see RFC 2136 section 3.2.3/3.2.4.
const dns::Rcode& rcode = getDnsUpdateResponse()->getRcode();
if ((rcode == dns::Rcode::NOERROR()) ||
- (rcode == dns::Rcode::NXDOMAIN())) {
+ (rcode == dns::Rcode::NXRRSET())) {
// We were able to remove it or it wasn't there, now we
// need to remove any other RRs for this FQDN.
transition(REMOVING_FWD_RRS_ST, UPDATE_OK_EVT);
@@ -318,14 +320,14 @@ NameRemoveTransaction::removingFwdRRsHandler() {
switch (getDnsUpdateStatus()) {
case DNSClient::SUCCESS: {
// We successfully received a response packet from the server.
+ // The RCODE will be based on a value-dependent RRset search,
+ // see RFC 2136 section 3.2.3/3.2.4.
const dns::Rcode& rcode = getDnsUpdateResponse()->getRcode();
- // @todo Not sure if NXDOMAIN is ok here, but I think so.
- // A Rcode of NXDOMAIN would mean there are no RRs for the FQDN,
- // which is fine. We were asked to delete them, they are not there
- // so all is well.
if ((rcode == dns::Rcode::NOERROR()) ||
- (rcode == dns::Rcode::NXDOMAIN())) {
- // We were able to remove the forward mapping. Mark it as done.
+ (rcode == dns::Rcode::NXRRSET())) {
+ // We were able to remove them or they were not there (
+ // Rcode of NXRRSET means there are no matching RRsets).
+ // In either case, we consider it success and mark it as done.
setForwardChangeCompleted(true);
// If request calls for reverse update then do that next,
@@ -471,11 +473,14 @@ NameRemoveTransaction::removingRevPtrsHandler() {
switch (getDnsUpdateStatus()) {
case DNSClient::SUCCESS: {
// We successfully received a response packet from the server.
+ // The RCODE will be based on a value-dependent RRset search,
+ // see RFC 2136 section 3.2.3/3.2.4.
const dns::Rcode& rcode = getDnsUpdateResponse()->getRcode();
if ((rcode == dns::Rcode::NOERROR()) ||
- (rcode == dns::Rcode::NXDOMAIN())) {
- // We were able to update the reverse mapping. Mark it as done.
- // @todo For now we are also treating NXDOMAIN as success.
+ (rcode == dns::Rcode::NXRRSET())) {
+ // We were able to remove the reverse mapping or they were
+ // not there (Rcode of NXRRSET means there are no matching
+ // RRsets). In either case, mark it as done.
setReverseChangeCompleted(true);
transition(PROCESS_TRANS_OK_ST, UPDATE_OK_EVT);
} else {
diff --git a/src/bin/d2/tests/nc_remove_unittests.cc b/src/bin/d2/tests/nc_remove_unittests.cc
index 246fdd2..6ca4ecf 100644
--- a/src/bin/d2/tests/nc_remove_unittests.cc
+++ b/src/bin/d2/tests/nc_remove_unittests.cc
@@ -603,8 +603,8 @@ TEST_F(NameRemoveTransactionTest, removingFwdAddrsHandler_FqdnNotInUse) {
// Run removingFwdAddrsHandler to construct and send the request.
EXPECT_NO_THROW(name_remove->removingFwdAddrsHandler());
- // Simulate receiving a FQDN not in use response.
- name_remove->fakeResponse(DNSClient::SUCCESS, dns::Rcode::NXDOMAIN());
+ // Simulate receiving a RRSET does not exist.
+ name_remove->fakeResponse(DNSClient::SUCCESS, dns::Rcode::NXRRSET());
// Run removingFwdAddrsHandler again to process the response.
EXPECT_NO_THROW(name_remove->removingFwdAddrsHandler());
@@ -963,8 +963,8 @@ TEST_F(NameRemoveTransactionTest, removingFwdRRsHandler_FqdnNotInUse) {
// Run removingFwdRRsHandler to construct and send the request.
EXPECT_NO_THROW(name_remove->removingFwdRRsHandler());
- // Simulate receiving a FQDN not in use response.
- name_remove->fakeResponse(DNSClient::SUCCESS, dns::Rcode::NXDOMAIN());
+ // Simulate receiving a RRSET does not exist response.
+ name_remove->fakeResponse(DNSClient::SUCCESS, dns::Rcode::NXRRSET());
// Run removingFwdRRsHandler again to process the response.
EXPECT_NO_THROW(name_remove->removingFwdRRsHandler());
@@ -1340,8 +1340,8 @@ TEST_F(NameRemoveTransactionTest, removingRevPtrsHandler_FqdnNotInUse) {
EXPECT_EQ(StateModel::NOP_EVT,
name_remove->getNextEvent());
- // Simulate receiving a FQDN not in use response.
- name_remove->fakeResponse(DNSClient::SUCCESS, dns::Rcode::NXDOMAIN());
+ // Simulate receiving a RRSET does not exist.
+ name_remove->fakeResponse(DNSClient::SUCCESS, dns::Rcode::NXRRSET());
// Run removingRevPtrsHandler again to process the response.
EXPECT_NO_THROW(name_remove->removingRevPtrsHandler());
More information about the bind10-changes
mailing list