Hi, Here's my compromise on the IPv4-mapped IPv6 address question:
if (tmp) { if (IN6_IS_ADDR_V4MAPPED(&in6sa->sin6_addr) || IN6_IS_ADDR_V4COMPAT(&in6sa->sin6_addr)) { if (strchr(data->hostip, '.')) { char const *lastcolon = strrchr(data->hostip, ':'); char *dst = data->hostip; while(lastcolon) { lastcolon++; *dst++ = *lastcolon; if (!*lastcolon) break; } } } } So we only do the evil hack if IN6_IS_ADDR_V4MAPPED or IN6_IS_ADDR_V4COMPAT returns true. I think that should be pretty safe... if we can't trust our system's own inet_ntop function, we're in trouble anyway. Comments welcomed. Regards, David. _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang