/* unused 0x0400 */
/* unused 0x0800 */
#define LI_O_ACC_CIP 0x1000 /* find the proxied address in the NetScaler Client IP header */
-/* unused 0x2000 */
-#define LI_O_MWORKER 0x4000 /* keep the FD open in the master but close it in the children */
+/* unused 0x2000 */
+/* unused 0x4000 */
#define LI_O_NOSTOP 0x8000 /* keep the listener active even after a soft stop */
/* Note: if a listener uses LI_O_UNLIMITED, it is highly recommended that it adds its own
#include <haproxy/namespace-t.h>
#include <haproxy/thread.h>
-/* Bit values for receiver->options */
+/* Bit values for receiver->flags */
#define RX_F_BOUND 0x00000001 /* receiver already bound */
#define RX_F_INHERITED 0x00000002 /* inherited FD from the parent process (fd@) */
+#define RX_F_MWORKER 0x00000004 /* keep the FD open in the master but close it in the children */
/* Bit values for rx_settings->options */
#define RX_O_FOREIGN 0x00000001 /* receives on foreign addresses */
l->accept = session_accept_fd;
l->default_target = mworker_proxy->default_target;
/* don't make the peers subject to global limits and don't close it in the master */
- l->options |= (LI_O_UNLIMITED|LI_O_MWORKER); /* we are keeping this FD in the master */
+ l->options |= LI_O_UNLIMITED;
+ l->rx.flags |= RX_F_MWORKER; /* we are keeping this FD in the master */
l->nice = -64; /* we want to boost priority for local stats */
global.maxsock++; /* for the listening socket */
}
* the workers. Conversely, if it's supposed to be only in the workers
* close it in the master.
*/
- if ((master && !(listener->options & LI_O_MWORKER)) ||
- (!master && (listener->options & LI_O_MWORKER))) {
+ if (!!master != !!(listener->rx.flags & RX_F_MWORKER))
do_unbind_listener(listener);
- }
if (listener->state == LI_LISTEN) {
BUG_ON(listener->rx.fd == -1);
*/
if (!stopping && !master &&
- !(listener->options & LI_O_MWORKER) &&
+ !(listener->rx.flags & RX_F_MWORKER) &&
(global.tune.options & GTUNE_SOCKET_TRANSFER))
return;
if (!stopping && master &&
- listener->options & LI_O_MWORKER &&
+ listener->rx.flags & RX_F_MWORKER &&
listener->rx.flags & RX_F_INHERITED)
return;
list_for_each_entry_safe(l, l_next, &curproxy->conf.listeners, by_fe) {
/* remove the listener, but not those we need in the master... */
- if (!(l->options & LI_O_MWORKER)) {
+ if (!(l->rx.flags & RX_F_MWORKER)) {
unbind_listener(l);
delete_listener(l);
} else {