aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/unix_socket
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl/unix_socket')
-rw-r--r--src/ssl/unix_socket/unx_sock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ssl/unix_socket/unx_sock.cpp b/src/ssl/unix_socket/unx_sock.cpp
index f9d9629fb..9954cdc06 100644
--- a/src/ssl/unix_socket/unx_sock.cpp
+++ b/src/ssl/unix_socket/unx_sock.cpp
@@ -41,6 +41,11 @@ Unix_Socket::Unix_Socket(const std::string& host, u16bit port) : peer(host)
::memset(&socket_info, 0, sizeof(socket_info));
socket_info.sin_family = AF_INET;
socket_info.sin_port = htons(port);
+
+ ::memcpy(&socket_info.sin_addr,
+ host_addr->h_addr,
+ host_addr->h_length);
+
socket_info.sin_addr = *(struct in_addr*)host_addr->h_addr; // FIXME
if(::connect(fd, (sockaddr*)&socket_info, sizeof(struct sockaddr)) != 0)