More distinct error codes for SOCKS

This commit is contained in:
z3APA3A 2016-03-08 12:43:07 +03:00
parent 5d0504cd33
commit b513584fdb

View File

@ -121,7 +121,7 @@ void * sockschild(struct clientparam* param) {
} }
#endif #endif
if(SAISNULL(&param->req)) { if(SAISNULL(&param->req)) {
RETURN(421); RETURN(431);
} }
myinet_ntop(*SAFAMILY(&param->sinsr), SAADDR(&param->sinsr), (char *)buf, 64); myinet_ntop(*SAFAMILY(&param->sinsr), SAADDR(&param->sinsr), (char *)buf, 64);
break; break;
@ -164,7 +164,7 @@ void * sockschild(struct clientparam* param) {
} }
*SAPORT(&param->sinsr) = *SAPORT(&param->req) = port; *SAPORT(&param->sinsr) = *SAPORT(&param->req) = port;
if(command == 1 && !*SAPORT(&param->sinsr)) {RETURN(421);} if(command == 1 && !*SAPORT(&param->sinsr)) {RETURN(461);}
switch(command) { switch(command) {
case 1: case 1:
param->operation = CONNECT; param->operation = CONNECT;