From: Ralf Jung Date: Sat, 17 Oct 2015 09:00:23 +0000 (+0200) Subject: accept more IPv6 addresses X-Git-Url: https://git.ralfj.de/zonemaker.git/commitdiff_plain/c531c539219a96962b19980d3ef98191cfdc356b?ds=sidebyside;hp=f036ee7868886116f0aab76a4cf80dae72b4cd19 accept more IPv6 addresses --- 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)