Add backlog config option

This commit is contained in:
Daniel Winzen committed 2022-11-08 15:04:19 +01:00
1 parent 65e57a251d
commit 9a6908e623
6 files changed
+23 -4

No files matched your search

+11
View File
@@ -550,6 +550,7 @@ static int h_maxconn(int argc, unsigned char **argv){
if(!conf.maxchild) {
return(1);
}
conf.backlog = 1 + (conf.maxchild>>3);
#ifndef _WIN32
{
struct rlimit rl;
@@ -565,6 +566,14 @@ static int h_maxconn(int argc, unsigned char **argv){
return 0;
}
static int h_backlog(int argc, unsigned char **argv){
conf.backlog = atoi((char *)argv[1]);
if(!conf.backlog) {
return(1);
}
return 0;
}
static int h_flush(int argc, unsigned char **argv){
freeacl(conf.acl);
conf.acl = NULL;
@@ -1612,6 +1621,7 @@ struct commands commandhandlers[]={
#ifndef NORADIUS
{commandhandlers+65, "radius", h_radius, 3, 0},
#endif
{commandhandlers+66, "backlog", h_backlog, 2, 2},
{specificcommands, "", h_noop, 1, 0}
};
@@ -1855,6 +1865,7 @@ void freeconf(struct extparam *confp){
*SAFAMILY(&confp->intsa) = AF_INET;
*SAFAMILY(&confp->extsa) = AF_INET;
confp->maxchild = 100;
confp->backlog = 13;
resolvfunc = NULL;
numservers = 0;
acl = confp->acl;