From 3086a2e1a1d13e44539fee75fad8feacce36b20f Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 18 Jan 2013 12:16:02 +0100 Subject: Fix connecting UDP sockets. (closes issue #131) --- openvpn/src/openvpn/socket.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openvpn/src/openvpn/socket.c b/openvpn/src/openvpn/socket.c index e3e93525..31ff6d21 100644 --- a/openvpn/src/openvpn/socket.c +++ b/openvpn/src/openvpn/socket.c @@ -1780,12 +1780,17 @@ link_socket_init_phase2 (struct link_socket *sock, phase2_tcp_client (sock, sig_info); } -#ifdef ENABLE_SOCKS - else if (sock->info.proto == PROTO_UDP && sock->socks_proxy && sock->info.af == AF_INET) + else if (sock->info.proto == PROTO_UDP) { - phase2_socks_client (sock, sig_info); +#ifdef ENABLE_SOCKS + if (sock->info.proto == PROTO_UDP && sock->socks_proxy) + { + phase2_socks_client (sock, sig_info); #endif + } + protect_fd_nonlocal (sock->sd, &sock->info.lsa->actual.dest.addr.sa); } + if (sig_info && sig_info->signal_received) goto done; } -- cgit v1.2.3