From 0693b67f200c3b02480e1185383bfa8507fbeeb7 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Tue, 22 Mar 2011 11:00:06 +0100 Subject: Prevent stacktrace when DNS AAAA record is added This patch fixes a stacktrace that is printed out when a IPv6 AAAA record with subnet prefix length (e.g. /64) is added. The same error message as when IPv4 record with subnet prefix length is used. https://fedorahosted.org/freeipa/ticket/1115 --- ipalib/plugins/dns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib') diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index e45a8f92..f58e1ae1 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -113,7 +113,7 @@ def _create_zone_serial(**kwargs): def _validate_ipaddr(ugettext, ipaddr): try: ip = netaddr.IPAddress(ipaddr) - except netaddr.AddrFormatError: + except (netaddr.AddrFormatError, ValueError): return u'invalid address format' return None -- cgit