summaryrefslogtreecommitdiff
path: root/openvpn/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-01-18 12:16:02 +0100
committerArne Schwabe <arne@rfc2549.org>2013-01-18 12:16:02 +0100
commitf14955df567c06db6e44491f6774f6e895a2254b (patch)
treef673eb7eccde5552e373273283c2357965189258 /openvpn/src
parent1e2d573229556c8431d7b82c5450ee34be8e6364 (diff)
Fix connecting UDP sockets. (closes issue #131)
Diffstat (limited to 'openvpn/src')
-rw-r--r--openvpn/src/openvpn/socket.c11
1 files 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;
}