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

>From 247a8e804bbb73861654d93c41315c5929b4139a Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Tue, 22 Mar 2011 11:00:06 +0100
Subject: [PATCH] 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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index e45a8f92127614c150585521308cfb3abfd0d2f1..f58e1ae1fae170270e8d065ada42da2f898992f5 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
 
-- 
1.7.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to