]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: raw_sock: correctly set the MSG_MORE flag
authorWilly Tarreau <w@1wt.eu>
Sun, 2 Feb 2014 00:44:13 +0000 (01:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Feb 2014 08:38:06 +0000 (09:38 +0100)
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

index fda7de19a1cda3e62237d99ad6fcc806ac1032c5..4b125ceb40ae95ea56723fd966f18df245338025 100644 (file)
@@ -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);