Package: dnspython / 1.16.0-1+deb10u1

fix-do-not-compare-with-expiration-if-None.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: When doing xfr, do not compare with
 expiration if it is None.
Author: Bob Halley <halley@dnspython.org>
Date: Sun, 29 Sep 2019 13:39:41 -0700
Origin: upstream, https://github.com/nrhall/dnspython/commit/9403c1bdbdf562cb01ee492b207b1f26191976ca
Bug-Report: https://github.com/rthalley/dnspython/issues/390
Last-Update: 2020-04-08

diff --git a/dns/query.py b/dns/query.py
index c0c517c..2a06c33 100644
--- a/dns/query.py
+++ b/dns/query.py
@@ -608,7 +608,8 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
     first = True
     while not done:
         mexpiration = _compute_expiration(timeout)
-        if mexpiration is None or mexpiration > expiration:
+        if mexpiration is None or \
+           (expiration is not None and mexpiration > expiration):
             mexpiration = expiration
         if use_udp:
             _wait_for_readable(s, expiration)