From: Bob Halley Date: Mon, 4 May 2020 14:22:29 +0000 (-0700) Subject: Ignore scopes in dns.inet.* X-Git-Tag: v2.0.0rc1~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02b9d8754d7b1d43b8d2ccd7a76784d119e2f594;p=thirdparty%2Fdnspython.git Ignore scopes in dns.inet.* --- diff --git a/dns/inet.py b/dns/inet.py index d7d50056..a1e8f648 100644 --- a/dns/inet.py +++ b/dns/inet.py @@ -52,7 +52,7 @@ def inet_pton(family, text): if family == AF_INET: return dns.ipv4.inet_aton(text) elif family == AF_INET6: - return dns.ipv6.inet_aton(text) + return dns.ipv6.inet_aton(text, True) else: raise NotImplementedError @@ -94,7 +94,7 @@ def af_for_address(text): return AF_INET except Exception: try: - dns.ipv6.inet_aton(text) + dns.ipv6.inet_aton(text, True) return AF_INET6 except: raise ValueError @@ -116,7 +116,7 @@ def is_multicast(text): return first >= 224 and first <= 239 except Exception: try: - first = dns.ipv6.inet_aton(text)[0] + first = dns.ipv6.inet_aton(text, True)[0] return first == 255 except Exception: raise ValueError