]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
dns.zone.from_xfr() in relativization mode incorrectly set zone.origin
authorBob Halley <halley@dnspython.org>
Fri, 2 Sep 2005 05:23:33 +0000 (05:23 +0000)
committerBob Halley <halley@dnspython.org>
Fri, 2 Sep 2005 05:23:33 +0000 (05:23 +0000)
to the empty name

Original author: Bob Halley <halley@dnspython.org>
Date: 2004-10-10 10:57:56

ChangeLog
dns/zone.py

index ce4528ac10c3c86f2ab0bebe050b5642b4c5b3f8..d6eaca5cb15ff9410240aa3077a6b91b6906d75f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2004-09-02  Bob Halley  <halley@nominum.com>
+2004-10-10  Bob Halley  <halley@dnspython.org>
+
+       * dns/zone.py (from_xfr): dns.zone.from_xfr() in relativization
+       mode incorrectly set zone.origin to the empty name.
+
+2004-09-02  Bob Halley  <halley@dnspython.org>
 
        * dns/name.py (Name.to_wire): The 'file' parameter to
        Name.to_wire() is now optional; if omitted, the wire form will
index 7590e595b84476db9b5bac65cdb53fcf148bfa53..e9a1aaf8be7ad10694289550607be05ca5a5cdae 100644 (file)
@@ -814,7 +814,10 @@ def from_xfr(xfr, zone_factory=Zone, relativize=True):
     z = None
     for r in xfr:
         if z is None:
-            origin = r.answer[0].name
+            if relativize:
+                origin = r.origin
+            else:
+                origin = r.answer[0].name
             rdclass = r.answer[0].rdclass
             z = zone_factory(origin, rdclass, relativize=relativize)
         for rrset in r.answer: