#define LI_O_TCP_L4_RULES 0x0010 /* run TCP L4 rules checks on the incoming connection */
#define LI_O_TCP_L5_RULES 0x0020 /* run TCP L5 rules checks on the incoming session */
/* unused 0x0040 */
-#define LI_O_ACC_PROXY 0x0080 /* find the proxied address in the first request line */
+/* unused 0x0080 */
#define LI_O_UNLIMITED 0x0100 /* listener not subject to global limits (peers & stats socket) */
/* unused 0x0200 */
/* unused 0x0400 */
/* unused 0x0800 */
-#define LI_O_ACC_CIP 0x1000 /* find the proxied address in the NetScaler Client IP header */
+/* unused 0x1000 */
/* unused 0x2000 */
/* unused 0x4000 */
#define LI_O_NOSTOP 0x8000 /* keep the listener active even after a soft stop */
#define BC_O_NOQUICKACK 0x00000100 /* disable quick ack of immediate data (linux) */
#define BC_O_DEF_ACCEPT 0x00000200 /* wait up to 1 second for data before accepting */
#define BC_O_TCP_FO 0x00000400 /* enable TCP Fast Open (linux >= 3.7) */
+#define BC_O_ACC_PROXY 0x00000800 /* find the proxied address in the first request line */
+#define BC_O_ACC_CIP 0x00001000 /* find the proxied address in the NetScaler Client IP header */
/* flags used with bind_conf->ssl_options */
/* parse the "accept-proxy" bind keyword */
static int bind_parse_accept_proxy(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
- struct listener *l;
-
- list_for_each_entry(l, &conf->listeners, by_bind)
- l->options |= LI_O_ACC_PROXY;
-
+ conf->options |= BC_O_ACC_PROXY;
return 0;
}
/* parse the "accept-netscaler-cip" bind keyword */
static int bind_parse_accept_netscaler_cip(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
- struct listener *l;
uint32_t val;
if (!*args[cur_arg + 1]) {
return ERR_ALERT | ERR_FATAL;
}
- list_for_each_entry(l, &conf->listeners, by_bind) {
- l->options |= LI_O_ACC_CIP;
- conf->ns_cip_magic = val;
- }
-
+ conf->options |= BC_O_ACC_CIP;
+ conf->ns_cip_magic = val;
return 0;
}
conn_ctrl_init(cli_conn);
/* wait for a PROXY protocol header */
- if (l->options & LI_O_ACC_PROXY)
+ if (l->bind_conf->options & BC_O_ACC_PROXY)
cli_conn->flags |= CO_FL_ACCEPT_PROXY;
/* wait for a NetScaler client IP insertion protocol header */
- if (l->options & LI_O_ACC_CIP)
+ if (l->bind_conf->options & BC_O_ACC_CIP)
cli_conn->flags |= CO_FL_ACCEPT_CIP;
/* Add the handshake pseudo-XPRT */