[Mimedefang] [Patch] relay_is_* not ipv6 friendly
David F. Skoll
dfs at roaringpenguin.com
Tue Feb 2 09:37:23 EST 2010
Michiel Brandenburg wrote:
+ if( $ip[$_] =~ /\./ ) {
+ # ipv4 mapped as ipv6
+ my @extraOcts = unpack('H4H4', pack('C4C4C4C4', split(/\./,
Actually, the Perl code will never see an IPv6-mapped IPv4 address, because
the mimedefang.c code converts such an address to "pure" IPv4:
/* Convert IPv6-mapped IPv4 address to pure IPv4. That is:
::ffff:xxx.yyy.zzz.www to simply xxx.yyy.zzz.www */
if (tmp) {
if (strchr(data->hostip, '.')) {
char const *lastcolon = strrchr(data->hostip, ':');
char *dst = data->hostip;
while(lastcolon) {
lastcolon++;
*dst++ = *lastcolon;
if (!*lastcolon) break;
}
}
}
Regards,
David.
More information about the MIMEDefang
mailing list