resist calling wierdly entered ip4 addresses ip6. Notes: Sat Oct 21 22:39:31 EDT 2006 geoff parseip should be changed to return -1 if it failed to parse, and 0 otherwise, and not let callers care. Reference: /n/sources/patch/sorry/libip-v4 Date: Fri Oct 20 16:23:38 CES 2006 Signed-off-by: quanstro@quanstro.net Reviewed-by: geoff --- /sys/src/libip/parseip.c Fri Oct 20 16:22:56 2006 +++ /sys/src/libip/parseip.c Fri Oct 20 16:22:54 2006 @@ -67,7 +67,7 @@ memmove(&to[elipsis+16-i], &to[elipsis], i-elipsis); memset(&to[elipsis], 0, 16-i); } - if(v4){ + if(v4 || memcmp(to, v4prefix, IPv4off) == 0){ to[10] = to[11] = 0xff; return nhgetl(to+12); } else