diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-16 01:46:24 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-16 01:46:24 +0000 |
commit | 7ef85434edf4b408405819453ca732b4e8a55049 (patch) | |
tree | 1bff2bdb49e87edc451ab40cf7c581c2e5dc5c62 /socket.c | |
parent | VERSION 2.1_beta3 (diff) | |
download | openvpn-7ef85434edf4b408405819453ca732b4e8a55049.tar.xz |
Fixed bug introduced in 2.1-beta3 where management
socket bind would fail.
Pre-2.1-beta4
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@635 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -685,16 +685,18 @@ socket_listen_accept (socket_descriptor_t sd, return new_sd; } -static void +void socket_bind (socket_descriptor_t sd, - struct openvpn_sockaddr *local) + struct openvpn_sockaddr *local, + const char *prefix) { struct gc_arena gc = gc_new (); if (bind (sd, (struct sockaddr *) &local->sa, sizeof (local->sa))) { const int errnum = openvpn_errno_socket (); - msg (M_FATAL, "TCP/UDP: Socket bind failed on local address %s: %s", + msg (M_FATAL, "%s: Socket bind failed on local address %s: %s", + prefix, print_sockaddr (local, &gc), strerror_ts (errnum, &gc)); } @@ -746,7 +748,7 @@ socket_connect (socket_descriptor_t *sd, *sd = create_socket_tcp (); if (bind_local) - socket_bind (*sd, local); + socket_bind (*sd, local, "TCP Client"); update_remote (remote_dynamic, remote, remote_changed); } @@ -818,10 +820,10 @@ resolve_bind_local (struct link_socket *sock) { #ifdef ENABLE_SOCKS if (sock->socks_proxy && sock->info.proto == PROTO_UDPv4) - socket_bind (sock->ctrl_sd, &sock->info.lsa->local); + socket_bind (sock->ctrl_sd, &sock->info.lsa->local, "SOCKS"); else #endif - socket_bind (sock->sd, &sock->info.lsa->local); + socket_bind (sock->sd, &sock->info.lsa->local, "TCP/UDP"); } gc_free (&gc); } |