Compare commits

..

No commits in common. "fe53378596df213f4e1be079c59b4d23be24ee62" and "fbca6d8e9328ad2b6fbd04344bcc7ded99f532c6" have entirely different histories.

4 changed files with 22 additions and 42 deletions

View File

@ -93,31 +93,27 @@ char *rotations[] = {
struct extparam conf = { struct extparam conf = {
{0, 0}, /* threadinit */ {0, 0},
{1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 0, 0}, /* timeouts */ {1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 0, 0},
NULL, /* struct ace * acl; */ NULL,
NULL, /* char * conffile; */ NULL,
NULL, NULL, /* struct bandlim * bandlimiter, *bandlimiterout; */ NULL, NULL,
NULL, /* struct connlim * connlimiter; */ NULL,
NULL, /* struct trafcount * trafcounter; */ NULL,
NULL, /* struct srvparam *services; */ NULL,
0, /* int stacksize, */ 0,
-1, 0, 0, 0, 0, /* counterd, haveerror, rotate, paused, archiverc, */ -1, 0, 0, 0, 0,
0, 500, 0, 0, 0, 0, 0, 0, 2, /* demon, maxchild, backlog, needreload, timetoexit, version, noforce, bandlimver, parentretries; */ 0, 500, 0, 0, 0, 0, 0, 0, 2,
6, 600, /* int authcachetype, authcachetime; */ 0, 0, 0,
1048576, /* int filtermaxsize; */ 6, 600,
0, 0, 0, /* int gracetraf, gracenum, gracedelay */ 1048576,
0, /* int maxseg */ NULL, NULL,
NULL, NULL, /* unsigned char *logname, **archiver; */ NONE, NONE,
NONE, NONE, /* ROTATION logtype, countertype; */ NULL,
NULL, /* char * counterfile; */
#ifndef NOIPV6 #ifndef NOIPV6
{AF_INET}, {AF_INET},{AF_INET6},{AF_INET},
{AF_INET6},
{AF_INET},
#else #else
{AF_INET}, {AF_INET},{AF_INET},
{AF_INET},
#endif #endif
NULL, NULL,
NULL, NULL,

View File

@ -466,11 +466,6 @@ static int h_rotate(int argc, unsigned char **argv){
return 0; return 0;
} }
static int h_maxseg(int argc, unsigned char **argv){
conf.maxseg = atoi((char *)argv[1]);
return 0;
}
static int h_logformat(int argc, unsigned char **argv){ static int h_logformat(int argc, unsigned char **argv){
unsigned char * old = conf.logformat; unsigned char * old = conf.logformat;
conf.logformat = (unsigned char *)mystrdup((char *)argv[1]); conf.logformat = (unsigned char *)mystrdup((char *)argv[1]);
@ -1650,12 +1645,11 @@ struct commands commandhandlers[]={
{commandhandlers+61, "force", h_force, 1, 1}, {commandhandlers+61, "force", h_force, 1, 1},
{commandhandlers+62, "noforce", h_noforce, 1, 1}, {commandhandlers+62, "noforce", h_noforce, 1, 1},
{commandhandlers+63, "parentretries", h_parentretries, 2, 2}, {commandhandlers+63, "parentretries", h_parentretries, 2, 2},
{commandhandlers+64, "auto", h_proxy, 1, 0}, {commandhandlers+64, "auto", h_proxy, 1, 0},
{commandhandlers+65, "backlog", h_backlog, 2, 2}, {commandhandlers+65, "backlog", h_backlog, 2, 2},
{commandhandlers+66, "tlspr", h_proxy, 1, 0}, {commandhandlers+66, "tlspr", h_proxy, 1, 0},
{commandhandlers+67, "maxseg", h_maxseg, 2, 2},
#ifndef NORADIUS #ifndef NORADIUS
{commandhandlers+68, "radius", h_radius, 3, 0}, {commandhandlers+67, "radius", h_radius, 3, 0},
#endif #endif
{specificcommands, "", h_noop, 1, 0} {specificcommands, "", h_noop, 1, 0}
}; };

View File

@ -170,9 +170,6 @@ struct socketoptions sockopts[] = {
#endif #endif
#ifdef TCP_FASTOPEN_CONNECT #ifdef TCP_FASTOPEN_CONNECT
{TCP_FASTOPEN_CONNECT, "TCP_FASTOPEN_CONNECT"}, {TCP_FASTOPEN_CONNECT, "TCP_FASTOPEN_CONNECT"},
#endif
#ifdef TCP_MAXSEG
{TCP_MAXSEG, "TCP_MAXSEG"},
#endif #endif
{0, NULL} {0, NULL}
}; };
@ -196,12 +193,6 @@ void setopts(SOCKET s, int opts){
int i, opt, set; int i, opt, set;
for(i = 0; opts >= (opt = (1<<i)); i++){ for(i = 0; opts >= (opt = (1<<i)); i++){
set = 1; set = 1;
#ifdef TCP_MAXSEG
if(sockopts[i].opt == TCP_MAXSEG){
if(!conf.maxseg) continue;
set = conf.maxseg;
}
#endif
if(opts & opt) setsockopt(s, *sockopts[i].optname == 'T'? IPPROTO_TCP: if(opts & opt) setsockopt(s, *sockopts[i].optname == 'T'? IPPROTO_TCP:
#ifdef SOL_IP #ifdef SOL_IP
*sockopts[i].optname == 'I'? SOL_IP: *sockopts[i].optname == 'I'? SOL_IP:

View File

@ -651,7 +651,6 @@ struct extparam {
int authcachetype, authcachetime; int authcachetype, authcachetime;
int filtermaxsize; int filtermaxsize;
int gracetraf, gracenum, gracedelay; int gracetraf, gracenum, gracedelay;
int maxseg;
unsigned char *logname, **archiver; unsigned char *logname, **archiver;
ROTATION logtype, countertype; ROTATION logtype, countertype;
char * counterfile; char * counterfile;