mirror of
https://github.com/3proxy/3proxy.git
synced 2026-08-04 14:46:18 +00:00
Do not use SAISNULL in plugin
This commit is contained in:
parent
ff1a560547
commit
930a959779
1 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue