summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-03-22 11:00:06 +0100
committerRob Crittenden <rcritten@redhat.com>2011-03-22 13:37:23 -0400
commit0693b67f200c3b02480e1185383bfa8507fbeeb7 (patch)
tree0d50331ebddba84b7864f911b1de6211b4ad7f13
parent18542cd165d047cba69ed2b3ac12e59993bf2fb0 (diff)
downloadfreeipa-0693b67f200c3b02480e1185383bfa8507fbeeb7.zip
freeipa-0693b67f200c3b02480e1185383bfa8507fbeeb7.tar.gz
freeipa-0693b67f200c3b02480e1185383bfa8507fbeeb7.tar.xz
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
-rw-r--r--ipalib/plugins/dns.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index e45a8f9..f58e1ae 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