summaryrefslogtreecommitdiff
path: root/openvpn
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
commit3086a2e1a1d13e44539fee75fad8feacce36b20f (patch)
treee26d36d65de8ec047c06ba22387bcbc42ec9479c /openvpn
parent2e6d49b0ebb1214a08c3064432d70cdde83b9ac6 (diff)
Fix connecting UDP sockets. (closes issue #131)
Diffstat (limited to 'openvpn')
-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;
}