From f9347c2f8bb9988de9a572d89526cb64a8e4f804 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Thu, 21 Oct 2021 19:56:09 +0300 Subject: [PATCH] Allow all-zero IP and port for BIND and UDP ASSOC --- src/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth.c b/src/auth.c index 634b092..a9a3040 100644 --- a/src/auth.c +++ b/src/auth.c @@ -384,7 +384,7 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){ } 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) if(IPInentry((struct sockaddr *)¶m->req, ipentry)) { break; @@ -432,7 +432,7 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){ } 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) if(ntohs(*SAPORT(¶m->req)) >= portentry->startport && ntohs(*SAPORT(¶m->req)) <= portentry->endport) {