From c531c539219a96962b19980d3ef98191cfdc356b Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Sat, 17 Oct 2015 11:00:23 +0200
Subject: [PATCH] accept more IPv6 addresses

---
 zone.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zone.py b/zone.py
index 5cd0d72..cbde170 100644
--- a/zone.py
+++ b/zone.py
@@ -33,7 +33,7 @@ week = 7*day
 
 REGEX_label = r'[a-zA-Z90-9]([a-zA-Z90-9-]{0,61}[a-zA-Z90-9])?' # max. 63 characters; must not start or end with hyphen
 REGEX_ipv4  = r'^\d{1,3}(\.\d{1,3}){3}$'
-REGEX_ipv6  = r'^[a-fA-F0-9]{1,4}(:[a-fA-F0-9]{1,4}){7}$'
+REGEX_ipv6  = r'^[a-fA-F0-9]{1,4}(::?[a-fA-F0-9]{1,4}){1,7}$'
 
 def check_label(label: str) -> str:
     label = str(label)
-- 
2.39.5