From f971636754beee85456b6cd6e5550e894e6aabd6 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 27 Jun 2020 15:34:29 -0700 Subject: [PATCH] Use serial number arithmetic in IXFR. --- dns/query.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dns/query.py b/dns/query.py index 2a1e7cc7..ae4258a6 100644 --- a/dns/query.py +++ b/dns/query.py @@ -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. # -- 2.47.3