Parcourir la source

[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

haikuo zhang il y a 13 ans
Parent
commit
0ed47de0a1
1 fichiers modifiés avec 3 ajouts et 7 suppressions
  1. 3 7
      src/lib/python/isc/ddns/session.py

+ 3 - 7
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)