BIND 10 trac2759, updated. 8354cca4763eceb0dfd3270823012511c14512cc [2759] Return rcode=REFUSED when validation fails

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Jun 28 00:02:25 UTC 2013


The branch, trac2759 has been updated
       via  8354cca4763eceb0dfd3270823012511c14512cc (commit)
      from  213d905ed8661b9d1f5ce214c6f391e702d518d7 (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 8354cca4763eceb0dfd3270823012511c14512cc
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Jun 28 05:32:01 2013 +0530

    [2759] Return rcode=REFUSED when validation fails

-----------------------------------------------------------------------

Summary of changes:
 src/lib/python/isc/ddns/session.py             |    6 +++++-
 src/lib/python/isc/ddns/tests/session_tests.py |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/ddns/session.py b/src/lib/python/isc/ddns/session.py
index e0cae24..6f2b7cf 100644
--- a/src/lib/python/isc/ddns/session.py
+++ b/src/lib/python/isc/ddns/session.py
@@ -867,9 +867,13 @@ class UpdateSession:
                               self.__diff.get_rrset_collection(),
                               (self.__validate_error, self.__validate_warning)):
                 raise UpdateError('Validation of the new zone failed',
-                                  self.__zname, self.__zclass, Rcode.SERVFAIL)
+                                  self.__zname, self.__zclass, Rcode.REFUSED)
             self.__diff.commit()
             return Rcode.NOERROR
+        except UpdateError:
+            # Propagate UpdateError exceptions (don't catch them in the
+            # blocks below)
+            raise
         except isc.datasrc.Error as dse:
             logger.info(LIBDDNS_UPDATE_DATASRC_COMMIT_FAILED, dse)
             return Rcode.SERVFAIL
diff --git a/src/lib/python/isc/ddns/tests/session_tests.py b/src/lib/python/isc/ddns/tests/session_tests.py
index 405abed..49bf672 100644
--- a/src/lib/python/isc/ddns/tests/session_tests.py
+++ b/src/lib/python/isc/ddns/tests/session_tests.py
@@ -1489,7 +1489,7 @@ class SessionTest(SessionTestBase):
                                  RRType.CNAME, 3600,
                                  [ "cname.example.org." ])
 
-        self.check_full_handle_result(Rcode.SERVFAIL, [ new_cname ])
+        self.check_full_handle_result(Rcode.REFUSED, [ new_cname ])
 
 class SessionACLTest(SessionTestBase):
     '''ACL related tests for update session.'''



More information about the bind10-changes mailing list