mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-27 07:59:41 +08:00
initial partial patches for IPv6 client support
This commit is contained in:
1 parent
f1e017394d
commit
c7310a2060
18 files changed
+134
-143
No files matched your search
+5
-5
@@ -83,7 +83,7 @@ int readdata (struct clientparam* param) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
socksendto(param->remsock, (struct sockaddr *)¶m->sins, buf, i, conf.timeouts[STRING_S]);
|
||||
socksendto(param->remsock, (struct sockaddr *)¶m->sinsr, buf, i, conf.timeouts[STRING_S]);
|
||||
}
|
||||
if(i < 1) {
|
||||
myfree(buf);
|
||||
@@ -99,7 +99,6 @@ void * smtppchild(struct clientparam* param) {
|
||||
int i=0, res;
|
||||
unsigned char buf[320];
|
||||
unsigned char username[256];
|
||||
unsigned long ul;
|
||||
char * command = NULL;
|
||||
int login = 0;
|
||||
|
||||
@@ -188,8 +187,9 @@ void * smtppchild(struct clientparam* param) {
|
||||
if( i < 3 ) {RETURN(671);}
|
||||
buf[i] = 0;
|
||||
if(strncasecmp((char *)buf, "220", 3)||!strncasecmp((char *)buf+4, "PROXY", 5)){RETURN(672);}
|
||||
ul = param->extip;
|
||||
i = sprintf(buf, "EHLO [%lu.%lu.%lu.%lu]\r\n", ((ul&0xFF000000)>>24), ((ul&0x00FF0000)>>16), ((ul&0x0000FF00)>>8), ((ul&0x000000FF)));
|
||||
i = sprintf(buf, "EHLO [");
|
||||
i += myinet_ntop(*SAFAMILY(¶m->sinsl), SAADDR(¶m->sinsl), buf+strlen(buf), 64);
|
||||
i += sprintf(buf+strlen(buf), "]\r\n");
|
||||
if(socksend(param->remsock, buf, i, conf.timeouts[STRING_S])!= i) {RETURN(673);}
|
||||
param->statscli64+=i;
|
||||
param->nwrites++;
|
||||
@@ -292,7 +292,7 @@ void * smtppchild(struct clientparam* param) {
|
||||
CLEANRET:
|
||||
|
||||
if(param->hostname&¶m->extusername) {
|
||||
sprintf((char *)buf, "%.64s@%.128s%c%hu", param->extusername, param->hostname, (ntohs(param->sins.sin_port)==25)?0:':', ntohs(param->sins.sin_port));
|
||||
sprintf((char *)buf, "%.64s@%.128s%c%hu", param->extusername, param->hostname, (ntohs(*SAPORT(¶m->sinsr))==25)?0:':', *SAPORT(¶m->sinsr));
|
||||
(*param->srv->logfunc)(param, buf);
|
||||
}
|
||||
else (*param->srv->logfunc)(param, NULL);
|
||||
|
||||
Reference in new issue
Block a user