From: Bob Halley Date: Fri, 2 Sep 2005 05:23:33 +0000 (+0000) Subject: dns.zone.from_xfr() in relativization mode incorrectly set zone.origin X-Git-Tag: v1.3.4~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0a21e8139c4909c9ae179d4244c02510f7abcca;p=thirdparty%2Fdnspython.git dns.zone.from_xfr() in relativization mode incorrectly set zone.origin to the empty name Original author: Bob Halley Date: 2004-10-10 10:57:56 --- diff --git a/ChangeLog b/ChangeLog index ce4528ac..d6eaca5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2004-09-02 Bob Halley +2004-10-10 Bob Halley + + * 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 * dns/name.py (Name.to_wire): The 'file' parameter to Name.to_wire() is now optional; if omitted, the wire form will diff --git a/dns/zone.py b/dns/zone.py index 7590e595..e9a1aaf8 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -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: