Use stricter semantics when checking IP address for DNS records

https://fedorahosted.org/freeipa/ticket/2379
This commit is contained in:
Petr Viktorin
2012-02-29 11:02:58 +01:00
committed by Martin Kosek
parent a6a83ec168
commit 45e92a338f
+1 -1
View File
@@ -214,7 +214,7 @@ def _reverse_zone_name(netstr):
def _validate_ipaddr(ugettext, ipaddr, ip_version=None):
try:
ip = netaddr.IPAddress(ipaddr)
ip = netaddr.IPAddress(ipaddr, flags=netaddr.INET_PTON)
if ip_version is not None:
if ip.version != ip_version: