diff options
author | JuanJo Ciarlante <jjo@google.com> | 2009-10-01 00:15:12 +0200 |
---|---|---|
committer | JuanJo Ciarlante <juanjosec@gmail.com> | 2011-03-25 13:30:29 +0100 |
commit | aa8e9576bbd2ecd094276521ad9cf88227a119c9 (patch) | |
tree | fa0f00f699e8527a8d71ba8b01719f48b2676edd | |
parent | * init.c: small in-doc tweaks (diff) | |
download | openvpn-aa8e9576bbd2ecd094276521ad9cf88227a119c9.tar.xz |
* fix multi-tcp crash (corrected assertion)
-rw-r--r-- | mtcp.c | 6 | ||||
-rw-r--r-- | socket.c | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -150,7 +150,11 @@ multi_tcp_instance_specific_init (struct multi_context *m, struct multi_instance ASSERT (mi->context.c2.link_socket); ASSERT (mi->context.c2.link_socket->info.lsa); ASSERT (mi->context.c2.link_socket->mode == LS_MODE_TCP_ACCEPT_FROM); - ASSERT (mi->context.c2.link_socket->info.lsa->actual.dest.addr.sa.sa_family == AF_INET); + ASSERT (mi->context.c2.link_socket->info.lsa->actual.dest.addr.sa.sa_family == AF_INET +#ifdef USE_PF_INET6 + || mi->context.c2.link_socket->info.lsa->actual.dest.addr.sa.sa_family == AF_INET6 +#endif + ); if (!mroute_extract_openvpn_sockaddr (&mi->real, &mi->context.c2.link_socket->info.lsa->actual.dest, true)) { msg (D_MULTI_ERRORS, "MULTI TCP: TCP client address is undefined"); @@ -1645,7 +1645,11 @@ link_socket_init_phase1 (struct link_socket *sock, if (mode == LS_MODE_TCP_ACCEPT_FROM) { ASSERT (accept_from); - ASSERT (sock->info.proto == PROTO_TCPv4_SERVER); + ASSERT (sock->info.proto == PROTO_TCPv4_SERVER +#ifdef USE_PF_INET6 + || sock->info.proto == PROTO_TCPv6_SERVER +#endif + ); ASSERT (!sock->inetd); sock->sd = accept_from->sd; } |