mirror of
https://github.com/3proxy/3proxy.git
synced 2026-05-13 13:57:26 +00:00
Use UDPMAP request address to limit client, not server
This commit is contained in:
parent
ff7f4b8ea6
commit
7a139e59a5
1 changed files with 5 additions and 7 deletions
|
|
@ -111,6 +111,11 @@ int udpsockmap(struct clientparam *param, int timeo)
|
|||
memcmp(SAADDR(&sin), SAADDR(¶m->sincr), SAADDRLEN(&sin)))
|
||||
continue;
|
||||
if (firstpacket) {
|
||||
if (!SAISNULL(¶m->req) && *SAPORT(¶m->req) &&
|
||||
SAADDRLEN(¶m->req) == SAADDRLEN(&sin) &&
|
||||
!memcmp(SAADDR(¶m->req), SAADDR(&sin), SAADDRLEN(¶m->req)) &&
|
||||
memcmp(SAPORT(¶m->req), SAPORT(&sin), 2))
|
||||
continue;
|
||||
param->sincr = sin;
|
||||
firstpacket = 0;
|
||||
} else if (memcmp(SAPORT(&sin), SAPORT(¶m->sincr), 2)) {
|
||||
|
|
@ -184,13 +189,6 @@ int udpsockmap(struct clientparam *param, int timeo)
|
|||
memcmp(SAPORT(&from), SAPORT(¶m->sinsr), 2))
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (!SAISNULL(¶m->req) && *SAPORT(¶m->req)) {
|
||||
if (SAADDRLEN(&from) != SAADDRLEN(¶m->req) ||
|
||||
memcmp(SAADDR(&from), SAADDR(¶m->req), SAADDRLEN(&from)) ||
|
||||
memcmp(SAPORT(&from), SAPORT(¶m->req), 2))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
param->statssrv64 += len;
|
||||
param->nreads++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue