From: Peter Palfrader Date: Thu, 16 May 2019 05:43:56 +0000 (+0200) Subject: fix ipv6 parsing. We would not properly handle empty blocks (i.e. ::). X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=20ea7eaf0d2818ccbf38972f9f3d32fe3690120b fix ipv6 parsing. We would not properly handle empty blocks (i.e. ::). This worked before and got broken in 28c3209e235e0d637172a1c5acd1e4142a58f8da --- diff --git a/ud-mailgate b/ud-mailgate index 32985d1..cd6b517 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -433,7 +433,7 @@ def DoDNS(Str, Attrs, DnRecord): if p == "": if seenEmptypart: return "Invalid IPv6 address (%s): more than one :: (nothing in between colons) is not allowed" % (ipv6address) - seenEmptypart = True + seenEmptypart = True sanitized = "%s IN AAAA %s" % (hostname, ipv6address) else: raise UDFormatError("None of the types I recognize was it. I shouldn't be here. confused.")