From d0a21e8139c4909c9ae179d4244c02510f7abcca Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Fri, 2 Sep 2005 05:23:33 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 ++++++- dns/zone.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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: -- 2.47.3