diff options
author | Thomas Markwalder <tmark@isc.org> | 2013-12-11 21:27:23 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2013-12-11 21:27:23 +0100 |
commit | 70941f1375063c52a43a10831dc9707c6303f55a (patch) | |
tree | 860ecc10cba1718ba66325c84e64eb4c21ed2276 /src | |
parent | [3088] Added DNS request construction to d2::NameRemoveTransaction (diff) | |
download | kea-70941f1375063c52a43a10831dc9707c6303f55a.tar.xz kea-70941f1375063c52a43a10831dc9707c6303f55a.zip |
[3088] Corrected commentary RFC references.
d2/nc_add.cc contained some inaccurate RFC references.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/d2/nc_add.cc | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/bin/d2/nc_add.cc b/src/bin/d2/nc_add.cc index e2849400a0..3773d6edbf 100644 --- a/src/bin/d2/nc_add.cc +++ b/src/bin/d2/nc_add.cc @@ -561,27 +561,28 @@ NameAddTransaction::buildAddFwdAddressRequest() { // Construct dns::Name from NCR fqdn. dns::Name fqdn(dns::Name(getNcr()->getFqdn())); + // Content on this request is based on RFC 4703, section 5.3.1 // First build the Prerequisite Section. - // Create 'FQDN Is Not In Use' prerequisite (RFC 2136, section 2.4.5) - // Add the RR to prerequisite section. + // Create 'FQDN Is Not In Use' prerequisite and add it to the + // prerequisite section. + // Based on RFC 2136, section 2.4.5 dns::RRsetPtr prereq(new dns::RRset(fqdn, dns::RRClass::NONE(), dns::RRType::ANY(), dns::RRTTL(0))); request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq); // Next build the Update Section. - // Create the FQDN/IP 'add' RR (RFC 2136, section 2.5.1) - // Set the message RData to lease address. - // Add the RR to update section. + // Create the FQDN/IP 'add' RR and add it to the to update section. + // Based on RFC 2136, section 2.5.1 dns::RRsetPtr update(new dns::RRset(fqdn, dns::RRClass::IN(), getAddressRRType(), dns::RRTTL(0))); addLeaseAddressRdata(update); request->addRRset(D2UpdateMessage::SECTION_UPDATE, update); - // Now create the FQDN/DHCID 'add' RR per RFC 4701) - // Set the message RData to DHCID. - // Add the RR to update section. + + // Now create the FQDN/DHCID 'add' RR and add it to update section. + // Based on RFC 2136, section 2.5.1 update.reset(new dns::RRset(fqdn, dns::RRClass::IN(), dns::RRType::DHCID(), dns::RRTTL(0))); addDhcidRdata(update); @@ -599,17 +600,19 @@ NameAddTransaction::buildReplaceFwdAddressRequest() { // Construct dns::Name from NCR fqdn. dns::Name fqdn(dns::Name(getNcr()->getFqdn())); + // Content on this request is based on RFC 4703, section 5.3.2 // First build the Prerequisite Section. - // Create an 'FQDN Is In Use' prerequisite (RFC 2136, section 2.4.4) - // Add it to the pre-requisite section. + // Create an 'FQDN Is In Use' prerequisite and add it to the + // pre-requisite section. + // Based on RFC 2136, section 2.4.4 dns::RRsetPtr prereq(new dns::RRset(fqdn, dns::RRClass::ANY(), dns::RRType::ANY(), dns::RRTTL(0))); request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq); - // Now create an DHCID matches prerequisite RR. - // Set the RR's RData to DHCID. - // Add it to the pre-requisite section. + // Create an DHCID matches prerequisite RR and add it to the + // pre-requisite section. + // Based on RFC 2136, section 2.4.2. prereq.reset(new dns::RRset(fqdn, dns::RRClass::IN(), dns::RRType::DHCID(), dns::RRTTL(0))); addDhcidRdata(prereq); @@ -617,16 +620,14 @@ NameAddTransaction::buildReplaceFwdAddressRequest() { // Next build the Update Section. - // Create the FQDN/IP 'delete' RR (RFC 2136, section 2.5.1) - // Set the message RData to lease address. - // Add the RR to update section. + // Create the FQDN/IP 'delete' RR and add it to the update section. + // Based on RFC 2136, section 2.5.2 dns::RRsetPtr update(new dns::RRset(fqdn, dns::RRClass::ANY(), getAddressRRType(), dns::RRTTL(0))); request->addRRset(D2UpdateMessage::SECTION_UPDATE, update); - // Create the FQDN/IP 'add' RR (RFC 2136, section 2.5.1) - // Set the message RData to lease address. - // Add the RR to update section. + // Create the FQDN/IP 'add' RR and add it to the update section. + // Based on RFC 2136, section 2.5.1 update.reset(new dns::RRset(fqdn, dns::RRClass::IN(), getAddressRRType(), dns::RRTTL(0))); addLeaseAddressRdata(update); @@ -645,6 +646,7 @@ NameAddTransaction::buildReplaceRevPtrsRequest() { std::string rev_addr = D2CfgMgr::reverseIpAddress(getNcr()->getIpAddress()); dns::Name rev_ip(rev_addr); + // Content on this request is based on RFC 4703, section 5.4 // Reverse replacement has no prerequisites so straight on to // building the Update section. |