From: Christopher Faulet Date: Wed, 7 Oct 2020 09:14:47 +0000 (+0200) Subject: BUG/MINOR: proto_tcp: Report warning messages when listeners are bound X-Git-Tag: v2.3-dev6~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a10000305f65265f51cb9aa7cb86409c794126d2;p=thirdparty%2Fhaproxy.git BUG/MINOR: proto_tcp: Report warning messages when listeners are bound 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 variable in this case. This patch should fix the issue #863. No backport is needed. --- diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 09d3e86192..138dd68fc5 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -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);