From: Willy Tarreau Date: Wed, 4 Nov 2020 13:58:36 +0000 (+0100) Subject: MINOR: sock: add a check against cross worker<->master socket activities X-Git-Tag: v2.3.0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4daeeb094ea03556613941f3977385270d6fe75;p=thirdparty%2Fhaproxy.git MINOR: sock: add a check against cross worker<->master socket activities Given that the previous issues caused spurious worker socket wakeups in the master for inherited FDs that couldn't be closed, let's add a strict test in the I/O callback to make sure that an accept() event is always caught by the appropriate type of process (master for master listeners, worker for worker listeners). --- diff --git a/src/sock.c b/src/sock.c index 3e2f208879..9eff7f1049 100644 --- a/src/sock.c +++ b/src/sock.c @@ -621,6 +621,7 @@ void sock_accept_iocb(int fd) if (!l) return; + BUG_ON(!!master != !!(l->rx.flags & RX_F_MWORKER)); listener_accept(l); }