]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Ignore scopes in dns.inet.*
authorBob Halley <halley@dnspython.org>
Mon, 4 May 2020 14:22:29 +0000 (07:22 -0700)
committerBob Halley <halley@dnspython.org>
Mon, 4 May 2020 14:22:29 +0000 (07:22 -0700)
dns/inet.py

index d7d500568b1c990e29108269643eb07f41cebd8d..a1e8f6484fb360ccc56bc8c394ce29ec94655f8e 100644 (file)
@@ -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