socks: a UDP association is not relayed direct when its parent fails

This commit is contained in:
Vladimir Dubrovin committed 2026-11-18 20:32:48 +03:00
1 parent 61b5ae5e0b
commit 7cf47d32ed
2 files changed
+104 -4

No files matched your search

+7 -4
View File
@@ -148,8 +148,10 @@ static void udpreset(struct clientparam *param)
/*
* Authorize param->req and (re)build the server side of the association:
* a parent proxy chain and/or an external address may be selected by the ACL.
* Returns the authorization result. param->remsock is INVALID_SOCKET if the
* socket can not be created, in this case the association can not continue.
* Returns the authorization result. param->remsock is INVALID_SOCKET when
* the authorization refused the association or the socket can not be
* created; the association can not continue then, so that a parent the
* rules demand is never quietly replaced by a direct relay.
*/
static int udpreconnect(struct clientparam *param)
{
@@ -175,9 +177,10 @@ static int udpreconnect(struct clientparam *param)
param->remsock = INVALID_SOCKET;
}
udpreset(param);
return res;
}
if (udpbind(param)) return res? res : 11;
return res;
if (udpbind(param)) return 11;
return 0;
}
int udpsockmap(struct clientparam *param, int timeo)