X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/zone/blobdiff_plain/32ebbe9b0fcc1a698c6ffec760259c5f7e953a9d..a2267e14628e71bdac3a67f1aca1686ee03eccc4:/net.lisp diff --git a/net.lisp b/net.lisp index c8852f9..7cd7e6d 100644 --- a/net.lisp +++ b/net.lisp @@ -156,8 +156,8 @@ (defgeneric ipaddr-comparable-p (addr-a addr-b) (eq (class-of addr-a) (class-of addr-b)))) (defun guess-address-class (str &key (start 0) (end nil)) - (declare (ignore str start end)) - 'ip4addr) + (cond ((position #\: str :start start :end end) 'ip6addr) + (t 'ip4addr))) (defgeneric parse-partial-ipaddr (class str &key start end min max) (:method ((object t) str &rest keywords)