MINOR: unix: use conn->dst for the target address in ->connect()
No extra check is needed since the destination must be set there.
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 66093af..513f34d 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -409,7 +409,7 @@
/*
* This function initiates a UNIX connection establishment to the target assigned
- * to connection <conn> using (si->{target,addr.to}). The source address is ignored
+ * to connection <conn> using (si->{target,dst}). The source address is ignored
* and will be selected by the system. conn->target may point either to a valid
* server or to a backend, depending on conn->target. Only OBJ_TYPE_PROXY and
* OBJ_TYPE_SERVER are supported. The <data> parameter is a boolean indicating
@@ -519,7 +519,7 @@
if (global.tune.server_rcvbuf)
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &global.tune.server_rcvbuf, sizeof(global.tune.server_rcvbuf));
- if (connect(fd, (struct sockaddr *)&conn->addr.to, get_addr_len(&conn->addr.to)) == -1) {
+ if (connect(fd, (struct sockaddr *)conn->dst, get_addr_len(conn->dst)) == -1) {
if (errno == EINPROGRESS || errno == EALREADY) {
conn->flags |= CO_FL_WAIT_L4_CONN;
}