From: Mark Wooding Date: Tue, 22 Apr 2014 13:14:24 +0000 (+0100) Subject: addr-family-ipv6.lisp (ipaddr-string): Ignore trivial runs of zeros. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/zone/commitdiff_plain/78c686d3a9b0c6f0abed0e78b3879756edfac3ea addr-family-ipv6.lisp (ipaddr-string): Ignore trivial runs of zeros. It seems that the convention is to write addresses out longhand if they have only isolated zero components. So do that here too. --- diff --git a/addr-family-ipv6.lisp b/addr-family-ipv6.lisp index e9dd1aa..5ed014e 100644 --- a/addr-family-ipv6.lisp +++ b/addr-family-ipv6.lisp @@ -168,7 +168,7 @@ (defmethod ipaddr-string ((ip ip6addr)) (incf i) (when (>= i end) (return)) (write-char #\: out)))))) - (cond ((null best-start) + (cond ((< best-length 2) (chunk 0 8)) ((and (= best-start 0) (or (and (= best-length 5)