From fc74c9261dcd36fd1ec0f10d48c9c0fc56ce17ea Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Tue, 17 Mar 2020 23:22:56 -0700 Subject: [PATCH] Fix IPSECKEY relativity. --- dns/rdtypes/IN/IPSECKEY.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dns/rdtypes/IN/IPSECKEY.py b/dns/rdtypes/IN/IPSECKEY.py index 8f49ba13..5e619239 100644 --- a/dns/rdtypes/IN/IPSECKEY.py +++ b/dns/rdtypes/IN/IPSECKEY.py @@ -146,5 +146,11 @@ class IPSECKEY(dns.rdata.Rdata): else: raise dns.exception.FormError('invalid IPSECKEY gateway type') key = wire[current: current + rdlen].unwrap() + if origin is not None and gateway_type == 3: + gateway = gateway.relativize(origin) return cls(rdclass, rdtype, header[0], gateway_type, header[2], gateway, key) + + def choose_relativity(self, origin=None, relativize=True): + if self.gateway_type == 3: + self.gateway = self.gateway.choose_relativity(origin, relativize) -- 2.47.3