#define LI_O_V6ONLY 0x0400 /* bind to IPv6 only on Linux >= 2.4.21 */
#define LI_O_V4V6 0x0800 /* bind to IPv4/IPv6 on Linux >= 2.4.21 */
#define LI_O_ACC_CIP 0x1000 /* find the proxied address in the NetScaler Client IP header */
-#define LI_O_INHERITED 0x2000 /* inherited FD from the parent process (fd@) */
+/* unused 0x2000 */
#define LI_O_MWORKER 0x4000 /* keep the FD open in the master but close it in the children */
#define LI_O_NOSTOP 0x8000 /* keep the listener active even after a soft stop */
/* Bit values for receiver->options */
#define RX_F_BOUND 0x00000001 /* receiver already bound */
+#define RX_F_INHERITED 0x00000002 /* inherited FD from the parent process (fd@) */
/* All the settings that are used to configure a receiver */
struct rx_settings {
l->default_target = global.stats_fe->default_target;
l->options |= (LI_O_UNLIMITED | LI_O_NOSTOP);
/* it's a sockpair but we don't want to keep the fd in the master */
- l->options &= ~LI_O_INHERITED;
+ l->rx.flags &= ~RX_F_INHERITED;
l->nice = -64; /* we want to boost priority for local stats */
global.maxsock++; /* for the listening socket */
}
proto->add(l, port);
if (inherited)
- l->options |= LI_O_INHERITED;
+ l->rx.flags |= RX_F_INHERITED;
HA_SPIN_INIT(&l->lock);
_HA_ATOMIC_ADD(&jobs, 1);
/* unbind the listener but does not close if
the FD is inherited with fd@ from the parent
process */
- if (l->options & LI_O_INHERITED)
+ if (l->rx.flags & RX_F_INHERITED)
unbind_listener_no_close(l);
else
unbind_listener(l);
thread_mask(listener->rx.settings->bind_thread) & all_threads_mask);
/* for now, all regularly bound TCP listeners are exportable */
- if (!(listener->options & LI_O_INHERITED))
+ if (!(listener->rx.flags & RX_F_INHERITED))
fdtab[fd].exported = 1;
tcp_return:
thread_mask(listener->rx.settings->bind_thread) & all_threads_mask);
/* for now, all regularly bound UNIX listeners are exportable */
- if (!(listener->options & LI_O_INHERITED))
+ if (!(listener->rx.flags & RX_F_INHERITED))
fdtab[fd].exported = 1;
return err;
continue;
}
/* The master should not close an inherited FD */
- if (master && (l->options & LI_O_INHERITED))
+ if (master && (l->rx.flags & RX_F_INHERITED))
unbind_listener_no_close(l);
else
unbind_listener(l);