diff options
author | JuanJo Ciarlante <jjo@google.com> | 2009-09-15 22:42:46 +0200 |
---|---|---|
committer | JuanJo Ciarlante <juanjosec@gmail.com> | 2011-03-25 13:30:29 +0100 |
commit | 97549c67678bb9b5196d4a87971e9fde6147cce0 (patch) | |
tree | 5250973fc47dcc962bc9f68a737d2ee0df10ba40 | |
parent | * support --disable-ipv6 build properly: (diff) | |
download | openvpn-97549c67678bb9b5196d4a87971e9fde6147cce0.tar.xz |
* important fix for tcp6 reconnection
was incorrectly creating a PF_INET socket
-rw-r--r-- | socket.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1251,7 +1251,20 @@ socket_connect (socket_descriptor_t *sd, if (*signal_received) goto done; - *sd = create_socket_tcp (); +#ifdef USE_PF_INET6 + switch(local->addr.sa.sa_family) + { + case PF_INET6: + *sd = create_socket_tcp6 (); + break; + case PF_INET: +#endif + *sd = create_socket_tcp (); +#ifdef USE_PF_INET6 + break; + } +#endif + if (bind_local) socket_bind (*sd, local, "TCP Client"); update_remote (remote_dynamic, remote, remote_changed, sockflags); |