From: Willy Tarreau Date: Mon, 27 Feb 2023 15:37:21 +0000 (+0100) Subject: MINOR: receiver: add RX_F_MUST_DUP to indicate that an rx must be duped X-Git-Tag: v2.8-dev8~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4c36aa8a165e12b6eb7d7817b7370793e32229b;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/receiver-t.h b/include/haproxy/receiver-t.h index 07155896ea..fcf43504d5 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 */