From: haikuo zhang Date: Thu, 7 Jun 2012 02:13:57 +0000 (+0800) Subject: [1514] If the new serial number is greater or equal to the old one, the SOA in X-Git-Tag: trac2351_base~226^2~59^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ed47de0a1900e15b7c70bfd67fc907ce85ff2cb;p=thirdparty%2Fkea.git [1514] If the new serial number is greater or equal to the old one, the SOA in zone should be replaced by the new one. If not, the serial number in SOA will be increased automatically --- diff --git a/src/lib/python/isc/ddns/session.py b/src/lib/python/isc/ddns/session.py index c97ddc7375..1f7cde2751 100644 --- a/src/lib/python/isc/ddns/session.py +++ b/src/lib/python/isc/ddns/session.py @@ -729,16 +729,12 @@ class UpdateSession: ZoneFinder.NO_WILDCARD | ZoneFinder.FIND_GLUE_OK) serial_operation = DDNS_SOA() - if self.__added_soa is not None: - # serial check goes here - if serial_operation.soa_update_check(old_soa, self.__added_soa): + if self.__added_soa is not None and\ + serial_operation.soa_update_check(old_soa, self.__added_soa): new_soa = self.__added_soa - else: - pass else: - new_soa = old_soa # increment goes here - new_soa = serial_operation.update_soa(new_soa) + new_soa = serial_operation.update_soa(old_soa) diff.delete_data(old_soa) diff.add_data(new_soa)