diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-01-18 12:16:02 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-01-18 12:16:02 +0100 |
commit | f14955df567c06db6e44491f6774f6e895a2254b (patch) | |
tree | f673eb7eccde5552e373273283c2357965189258 /openvpn | |
parent | 1e2d573229556c8431d7b82c5450ee34be8e6364 (diff) |
Fix connecting UDP sockets. (closes issue #131)
Diffstat (limited to 'openvpn')
-rw-r--r-- | openvpn/src/openvpn/socket.c | 11 |
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; } |