mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Do not use SAISNULL in plugin
This commit is contained in:
parent
ff1a560547
commit
930a959779
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user