Changed -a / -s options handling for 'anonymous' after last commit

This commit is contained in:
z3apa3a 2016-12-19 03:19:17 +03:00
parent 6696b35d74
commit 1ab549036c
5 changed files with 10 additions and 6 deletions

View File

@ -73,7 +73,8 @@ struct extparam conf = {
#else
0,
#endif
0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0,
0, -1, 0, 0, 0, 0,
0, 500, 0, 0, 0, 0,
6, 600,
1048576,
NULL, NULL,

View File

@ -1642,7 +1642,6 @@ void freeconf(struct extparam *confp){
#endif
*SAFAMILY(&confp->intsa) = AF_INET;
*SAFAMILY(&confp->extsa) = AF_INET;
confp->singlepacket = 0;
confp->maxchild = 100;
resolvfunc = NULL;
numservers = 0;

View File

@ -240,7 +240,7 @@ void * proxychild(struct clientparam* param) {
if(!(buf = myalloc(BUFSIZE))) {RETURN(21);}
bufsize = BUFSIZE;
anonymous = param->srv->singlepacket;
anonymous = param->srv->anonymous;
for(;;){
memset(buf, 0, bufsize);
inbuf = 0;

View File

@ -304,8 +304,10 @@ int MODULEMAINFUNC (int argc, char** argv){
case 'S':
srv.stacksize = atoi(argv[i]+2);
break;
case 's':
case 'a':
srv.anonymous = 1 + atoi(argv[i]+2);
break;
case 's':
if(isudp)
srv.singlepacket = 1 + atoi(argv[i]+2);
else

View File

@ -388,6 +388,7 @@ struct srvparam {
int family;
int stacksize;
int noforce;
int anonymous;
#ifdef WITHSPLICE
int usesplice;
#endif
@ -513,8 +514,9 @@ struct extparam {
struct bandlim * bandlimiter, *bandlimiterout;
struct trafcount * trafcounter;
struct srvparam *services;
int stacksize, threadinit, counterd, haveerror, rotate, paused, archiverc,
demon, maxchild, singlepacket, needreload, timetoexit, version, noforce;
int stacksize,
threadinit, counterd, haveerror, rotate, paused, archiverc,
demon, maxchild, needreload, timetoexit, version, noforce;
int authcachetype, authcachetime;
int filtermaxsize;
unsigned char *logname, **archiver;