From 7e4086dc183fb4e1db619b6e4394c7644e388542 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Feb 2014 01:44:13 +0100 Subject: [PATCH] BUG/MINOR: raw_sock: correctly set the MSG_MORE flag Due to a typo, the MSG_MORE flag used to replace MSG_NOSIGNAL and MSG_DONTWAIT. Fortunately, sockets are always marked non-blocking, so the loss of MSG_DONTWAIT is harmless, and the NOSIGNAL is covered by the interception of the SIGPIPE. So no issue could have been caused by this bug. --- src/raw_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raw_sock.c b/src/raw_sock.c index fda7de19a..4b125ceb4 100644 --- a/src/raw_sock.c +++ b/src/raw_sock.c @@ -373,7 +373,7 @@ static int raw_sock_from_buf(struct connection *conn, struct buffer *buf, int fl send_flag = MSG_DONTWAIT | MSG_NOSIGNAL; if (try < buf->o) - send_flag = MSG_MORE; + send_flag |= MSG_MORE; ret = send(conn->t.sock.fd, bo_ptr(buf), try, send_flag | flags);