From: Willy Tarreau Date: Wed, 17 Jul 2019 09:40:51 +0000 (+0200) Subject: MINOR: stream-int: use conn_get_{src,dst} in conn_si_send_proxy() X-Git-Tag: v2.1-dev2~324 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7bb447c3ddcc3f5cd5d117d4cd3f79f334ff6730;p=thirdparty%2Fhaproxy.git MINOR: stream-int: use conn_get_{src,dst} in conn_si_send_proxy() These ones replace the previous conn_get_{from,to}_addr() used to wait for the connection establishment before sending a LOCAL line. The error handling was preserved. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 9b9a8e9fac..75e60ff609 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -381,12 +381,7 @@ int conn_si_send_proxy(struct connection *conn, unsigned int flag) /* The target server expects a LOCAL line to be sent first. Retrieving * local or remote addresses may fail until the connection is established. */ - conn_get_from_addr(conn); - if (!(conn->flags & CO_FL_ADDR_FROM_SET)) - goto out_wait; - - conn_get_to_addr(conn); - if (!(conn->flags & CO_FL_ADDR_TO_SET)) + if (!conn_get_src(conn) || !conn_get_dst(conn)) goto out_wait; ret = make_proxy_line(trash.area, trash.size,