]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: receiver: add RX_F_MUST_DUP to indicate that an rx must be duped
authorWilly Tarreau <w@1wt.eu>
Mon, 27 Feb 2023 15:37:21 +0000 (16:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Apr 2023 15:41:26 +0000 (17:41 +0200)
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

index 07155896ea2ec5e30367c90fb9da1a1bfe56f00b..fcf43504d51e91247d557713f8b6951b6468e118 100644 (file)
@@ -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 */