mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45:40 +08:00
Allow all-zero IP and port for BIND and UDP ASSOC
This commit is contained in:
parent
58cf0d8def
commit
f9347c2f8b
@ -384,7 +384,7 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
}
|
}
|
||||||
if(!ipentry) return 0;
|
if(!ipentry) return 0;
|
||||||
}
|
}
|
||||||
if((acentry->dst && !SAISNULL(¶m->req)) || (acentry->dstnames && param->hostname)) {
|
if((acentry->dst && (!SAISNULL(¶m->req) || param->operation == UDPASSOC || param->operation==BIND)) || (acentry->dstnames && param->hostname)) {
|
||||||
for(ipentry = acentry->dst; ipentry; ipentry = ipentry->next)
|
for(ipentry = acentry->dst; ipentry; ipentry = ipentry->next)
|
||||||
if(IPInentry((struct sockaddr *)¶m->req, ipentry)) {
|
if(IPInentry((struct sockaddr *)¶m->req, ipentry)) {
|
||||||
break;
|
break;
|
||||||
@ -432,7 +432,7 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
}
|
}
|
||||||
if(!ipentry && !hstentry) return 0;
|
if(!ipentry && !hstentry) return 0;
|
||||||
}
|
}
|
||||||
if(acentry->ports && *SAPORT(¶m->req)) {
|
if(acentry->ports && (*SAPORT(¶m->req) || param->operation == UDPASSOC || param->operation == BIND)) {
|
||||||
for (portentry = acentry->ports; portentry; portentry = portentry->next)
|
for (portentry = acentry->ports; portentry; portentry = portentry->next)
|
||||||
if(ntohs(*SAPORT(¶m->req)) >= portentry->startport &&
|
if(ntohs(*SAPORT(¶m->req)) >= portentry->startport &&
|
||||||
ntohs(*SAPORT(¶m->req)) <= portentry->endport) {
|
ntohs(*SAPORT(¶m->req)) <= portentry->endport) {
|
||||||
|
Loading…
Reference in New Issue
Block a user