]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1514] If the new serial number is greater or equal to the old one, the SOA in
authorhaikuo zhang <zhanghaikuo@cnnic.cn>
Thu, 7 Jun 2012 02:13:57 +0000 (10:13 +0800)
committerhaikuo zhang <zhanghaikuo@cnnic.cn>
Thu, 7 Jun 2012 02:13:57 +0000 (10:13 +0800)
zone should be replaced by the new one. If not, the serial number in SOA will be
increased automatically

src/lib/python/isc/ddns/session.py

index c97ddc7375a2491a6b5fb62f91c655c2e08ef328..1f7cde2751b3654f7c5d0c2c7779ddf11fb2ba6c 100644 (file)
@@ -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)