Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
c943bd48
Commit
c943bd48
authored
Mar 11, 2014
by
Thomas Markwalder
Browse files
[3362] Added additional commentary regarding use of NXRRSET in NameChangeRemove
parent
72d508ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/d2/nc_remove.cc
View file @
c943bd48
...
...
@@ -214,6 +214,8 @@ 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
::
NXRRSET
()))
{
...
...
@@ -318,13 +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
();
// A Rcode of NXRRSET means 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
::
NXRRSET
()))
{
// We were able to remove the forward mapping. Mark it as done.
// 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,
...
...
@@ -470,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
::
NXRRSET
()))
{
// We were able to update the reverse mapping. Mark it as done.
// We are also treating NXRRSET as success.
// 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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment