]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Use serial number arithmetic in IXFR.
authorBob Halley <halley@play-bow.org>
Sat, 27 Jun 2020 22:34:29 +0000 (15:34 -0700)
committerBob Halley <halley@play-bow.org>
Sat, 27 Jun 2020 22:34:29 +0000 (15:34 -0700)
dns/query.py

index 2a1e7cc79fd2546ded139d59e41e8be5b63a7de9..ae4258a6962024d16431d5e3431832620e34a928 100644 (file)
@@ -34,6 +34,7 @@ import dns.message
 import dns.rcode
 import dns.rdataclass
 import dns.rdatatype
+import dns.serial
 
 try:
     import requests
@@ -954,7 +955,7 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
                 answer_index = 1
                 soa_rrset = rrset.copy()
                 if rdtype == dns.rdatatype.IXFR:
-                    if soa_rrset[0].serial <= serial:
+                    if dns.serial.Serial(soa_rrset[0].serial) <= serial:
                         #
                         # We're already up-to-date.
                         #