mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
port range support (parent extport / intport)
This commit is contained in:
1 parent
1565c67c13
commit
6ca4a2686d
11 files changed
+128
-11
No files matched your search
+6
-2
@@ -218,7 +218,10 @@ void * sockschild(struct clientparam* param) {
|
||||
if((res = udpbind(param))) {RETURN(res);}
|
||||
}
|
||||
else if(command == 2) {
|
||||
if(param->srv->so._bind(param->sostate, param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
|
||||
if(bindwithrange(param, param->remsock, ¶m->sinsl, param->extport)) {
|
||||
/* a range has already been searched, retrying on any port would
|
||||
ignore what was asked for */
|
||||
if(param->extport) RETURN (12);
|
||||
*SAPORT(¶m->sinsl) = 0;
|
||||
if(param->srv->so._bind(param->sostate, param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl)))RETURN (12);
|
||||
#if SOCKSTRACE > 0
|
||||
@@ -243,7 +246,8 @@ fflush(stderr);
|
||||
#endif
|
||||
sin = param->sincl;
|
||||
*SAPORT(&sin) = 0;
|
||||
if(param->srv->so._bind(param->sostate, param->clisock,(struct sockaddr *)&sin,SASIZE(&sin))) {RETURN (12);}
|
||||
/* the port the client is told to send its datagrams to */
|
||||
if(bindwithrange(param, param->clisock, &sin, param->intport)) {RETURN (12);}
|
||||
sasize = SASIZE(&sin);
|
||||
param->srv->so._getsockname(param->sostate, param->clisock, (struct sockaddr *)&sin, &sasize);
|
||||
#if SOCKSTRACE > 0
|
||||
|
||||
Reference in new issue
Block a user