From e4c36aa8a165e12b6eb7d7817b7370793e32229b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 27 Feb 2023 16:37:21 +0100 Subject: [PATCH] MINOR: receiver: add RX_F_MUST_DUP to indicate that an rx must be duped The purpose of this new flag will be to mark that some listeners duplicate their reference's FD instead of trying to setup a completely new listener from scratch. This will be used when multiple groups want to listen to the same socket, via multiple FDs. --- include/haproxy/receiver-t.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/haproxy/receiver-t.h b/include/haproxy/receiver-t.h index 07155896e..fcf43504d 100644 --- a/include/haproxy/receiver-t.h +++ b/include/haproxy/receiver-t.h @@ -31,8 +31,9 @@ /* 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_INHERITED 0x00000002 /* inherited FD from the parent process (fd@) or duped from another local receiver */ #define RX_F_MWORKER 0x00000004 /* keep the FD open in the master but close it in the children */ +#define RX_F_MUST_DUP 0x00000008 /* this receiver's fd must be dup() from a reference; ignore socket-level ops here */ /* Bit values for rx_settings->options */ #define RX_O_FOREIGN 0x00000001 /* receives on foreign addresses */