#define LI_O_NONE 0x0000
/* unused 0x0001 */
/* unused 0x0002 */
-#define LI_O_NOQUICKACK 0x0004 /* disable quick ack of immediate data (linux) */
+/* unused 0x0004 */
#define LI_O_DEF_ACCEPT 0x0008 /* wait up to 1 second for data before accepting */
#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 */
#define BC_O_USE_XPRT_DGRAM 0x00000020 /* at least one dgram-only xprt listener is used */
#define BC_O_USE_XPRT_STREAM 0x00000040 /* at least one stream-only xprt listener is used */
#define BC_O_NOLINGER 0x00000080 /* disable lingering on these listeners */
+#define BC_O_NOQUICKACK 0x00000100 /* disable quick ack of immediate data (linux) */
/* flags used with bind_conf->ssl_options */
bind_conf->accept = session_accept_fd;
if (curproxy->options & PR_O_TCP_NOLING)
bind_conf->options |= BC_O_NOLINGER;
+
+ /* smart accept mode is automatic in HTTP mode */
+ if ((curproxy->options2 & PR_O2_SMARTACC) ||
+ ((curproxy->mode == PR_MODE_HTTP || (bind_conf->options & BC_O_USE_SSL)) &&
+ !(curproxy->no_options2 & PR_O2_SMARTACC)))
+ bind_conf->options |= BC_O_NOQUICKACK;
}
/* adjust this proxy's listeners */
if (!LIST_ISEMPTY(&curproxy->tcp_req.l5_rules))
listener->options |= LI_O_TCP_L5_RULES;
-
- /* smart accept mode is automatic in HTTP mode */
- if ((curproxy->options2 & PR_O2_SMARTACC) ||
- ((curproxy->mode == PR_MODE_HTTP || (listener->bind_conf->options & BC_O_USE_SSL)) &&
- !(curproxy->no_options2 & PR_O2_SMARTACC)))
- listener->options |= LI_O_NOQUICKACK;
}
/* Release unused SSL configs */
* in case we previously disabled it, otherwise we might cause
* the client to delay further data.
*/
- if ((sess->listener && (sess->listener->options & LI_O_NOQUICKACK)) && !(htx->flags & HTX_FL_EOM))
+ if ((sess->listener && (sess->listener->bind_conf->options & BC_O_NOQUICKACK)) && !(htx->flags & HTX_FL_EOM))
conn_set_quickack(cli_conn, 1);
/*************************************************************
}
#endif
#if defined(TCP_QUICKACK)
- if (listener->options & LI_O_NOQUICKACK)
+ if (listener->bind_conf->options & BC_O_NOQUICKACK)
setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, &zero, sizeof(zero));
else
setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, &one, sizeof(one));