diff --git a/src/common.c b/src/common.c index 3a8b26e..8c0ba6c 100644 --- a/src/common.c +++ b/src/common.c @@ -63,7 +63,7 @@ struct extparam conf = { #else 0, #endif - 0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0, 6, 600, 1048576, NULL, NULL, diff --git a/src/conf.c b/src/conf.c index 8e23d32..16c377e 100644 --- a/src/conf.c +++ b/src/conf.c @@ -340,6 +340,17 @@ static int h_stacksize(int argc, unsigned char **argv){ return 0; } + +static int h_force(int argc, unsigned char **argv){ + conf.noforce = 0; + return 0; +} + +static int h_noforce(int argc, unsigned char **argv){ + conf.noforce = 1; + return 0; +} + static int h_service(int argc, unsigned char **argv){ return 0; } @@ -1399,6 +1410,8 @@ struct commands commandhandlers[]={ {commandhandlers+56, "delimchar",h_delimchar, 2, 2}, {commandhandlers+57, "authnserver", h_authnserver, 2, 2}, {commandhandlers+58, "stacksize", h_stacksize, 2, 2}, + {commandhandlers+59, "force", h_force, 1, 1}, + {commandhandlers+60, "noforce", h_noforce, 1, 1}, {specificcommands, "", h_noop, 1, 0} }; diff --git a/src/proxymain.c b/src/proxymain.c index 5340704..d6c1a37 100644 --- a/src/proxymain.c +++ b/src/proxymain.c @@ -713,6 +713,7 @@ void srvinit(struct srvparam * srv, struct clientparam *param){ srv->version = conf.version + 1; srv->paused = conf.paused; srv->logfunc = conf.logfunc; + srv->noforce = conf.noforce; if(srv->logformat)myfree(srv->logformat); srv->logformat = conf.logformat? (unsigned char *)mystrdup((char *)conf.logformat) : NULL; srv->authfunc = conf.authfunc; diff --git a/src/structures.h b/src/structures.h index 5008012..9f286be 100644 --- a/src/structures.h +++ b/src/structures.h @@ -373,6 +373,7 @@ struct srvparam { int nfilters, nreqfilters, nhdrfilterscli, nhdrfilterssrv, npredatfilters, ndatfilterscli, ndatfilterssrv; int family; int stacksize; + int noforce; unsigned bufsize; unsigned logdumpsrv, logdumpcli; #ifndef NOIPV6 @@ -496,7 +497,7 @@ struct extparam { struct trafcount * trafcounter; struct srvparam *services; int stacksize, threadinit, counterd, haveerror, rotate, paused, archiverc, - demon, maxchild, singlepacket, needreload, timetoexit, version; + demon, maxchild, singlepacket, needreload, timetoexit, version, noforce; int authcachetype, authcachetime; int filtermaxsize; unsigned char *logname, **archiver;