diff --git a/src/plugins/TransparentPlugin/transparent_plugin.c b/src/plugins/TransparentPlugin/transparent_plugin.c index cc8b06a..c0fce07 100644 --- a/src/plugins/TransparentPlugin/transparent_plugin.c +++ b/src/plugins/TransparentPlugin/transparent_plugin.c @@ -23,7 +23,6 @@ extern "C" { #endif -static char* NULLADDR="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; static struct pluginlink * pl; @@ -43,7 +42,7 @@ static FILTER_ACTION transparent_filter_client(void *fo, struct clientparam * pa #ifdef WITH_NETFILTER #ifdef SO_ORIGINAL_DST - if(getsockopt(param->clisock, SOL_IP, SO_ORIGINAL_DST,(struct sockaddr *) ¶m->req, &len) || SAISNULL(¶m->req)){ + if(getsockopt(param->clisock, SOL_IP, SO_ORIGINAL_DST,(struct sockaddr *) ¶m->req, &len) || (!memcmp(((struct sockaddr_in *)¶m->req)->sin_family == AF_INET6? (char *)&((struct sockaddr_in6 *)¶m->req)->sin6_addr : (char *)&((struct sockaddr_in *)¶m->req)->sin_addr.s_addr, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", (((struct sockaddr_in *)¶m->req)->sin_family == AF_INET6? 16:4)))){ return PASS; } #else