net.lisp, zone.lisp: Support for IPv6 addresses.
[zone] / net.lisp
index c8852f9..7cd7e6d 100644 (file)
--- a/net.lisp
+++ b/net.lisp
     (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)