int maxseg; /* for TCP, advertised MSS */
int tcp_ut; /* for TCP, user timeout */
int maxaccept; /* if set, max number of connections accepted at once (-1 when disabled) */
+ unsigned int backlog; /* if set, listen backlog */
int level; /* stats access level (ACCESS_LVL_*) */
int severity_output; /* default severity output format in cli feedback messages */
struct list listeners; /* list of listeners using this bind config */
struct fe_counters *counters; /* statistics counters */
int nbconn; /* current number of connections on this listener */
int maxconn; /* maximum connections allowed on this listener */
- unsigned int backlog; /* if set, listen backlog */
int (*accept)(struct connection *conn); /* upper layer's accept() */
enum obj_type *default_target; /* default target to use for accepted sessions or NULL */
/* cache line boundary */
*/
int listener_backlog(const struct listener *l)
{
- if (l->backlog)
- return l->backlog;
+ if (l->bind_conf->backlog)
+ return l->bind_conf->backlog;
if (l->bind_conf->frontend->backlog)
return l->bind_conf->frontend->backlog;
/* parse the "backlog" bind keyword */
static int bind_parse_backlog(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
- struct listener *l;
int val;
if (!*args[cur_arg + 1]) {
return ERR_ALERT | ERR_FATAL;
}
- list_for_each_entry(l, &conf->listeners, by_bind)
- l->backlog = val;
-
+ conf->backlog = val;
return 0;
}