]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proto_tcp: Report warning messages when listeners are bound
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2020 09:14:47 +0000 (11:14 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2020 12:07:16 +0000 (14:07 +0200)
When a TCP listener is bound, in the tcp_bind_listener() function, a warning
message may be reported and should be displayed on verbose mode. But the warning
message is actually lost if the socket is successfully bound because we don't
fill the <errmsg> variable in this case.

This patch should fix the issue #863. No backport is needed.

src/proto_tcp.c

index 09d3e861922370825c2c9dbdfd203d0ff24f6189..138dd68fc524057bf2d86bcd3f4886d7e9e97c48 100644 (file)
@@ -677,7 +677,7 @@ int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen)
 
        /* the socket is ready */
        listener->state = LI_LISTEN;
-       return err;
+       goto tcp_return;
 
  tcp_close_return:
        close(fd);