mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
MINOR: server: make sure pool-max-conn is >= -1
The keyword parser doesn't check the value range, but supported values are -1 and positive values, thus we should check it. This can be backported to 1.9.
This commit is contained in:
parent
1e7d444eec
commit
cb923d5001
@ -389,7 +389,12 @@ static int srv_parse_pool_max_conn(char **args, int *cur_arg, struct proxy *curp
|
|||||||
memprintf(err, "'%s' expects <value> as argument.\n", args[*cur_arg]);
|
memprintf(err, "'%s' expects <value> as argument.\n", args[*cur_arg]);
|
||||||
return ERR_ALERT | ERR_FATAL;
|
return ERR_ALERT | ERR_FATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
newsrv->max_idle_conns = atoi(arg);
|
newsrv->max_idle_conns = atoi(arg);
|
||||||
|
if ((int)newsrv->max_idle_conns < -1) {
|
||||||
|
memprintf(err, "'%s' must be >= -1", args[*cur_arg]);
|
||||||
|
return ERR_ALERT | ERR_FATAL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user