]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix two instances of asserting AF_INET
authorArne Schwabe <arne@rfc2549.org>
Thu, 21 Nov 2013 20:08:07 +0000 (21:08 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 24 Nov 2013 12:27:04 +0000 (13:27 +0100)
The http-proxy and socks-proxy work fine with IPv6 but assert having IPv4
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1385064495-25877-6-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8010

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/socket.c

index d4058cf4e2772d7efd5617202b1d7e5708483922..6c50197b123cfedf00a772323554b2b54efde73e 100644 (file)
@@ -1419,7 +1419,7 @@ link_socket_init_phase1 (struct link_socket *sock,
   /* are we running in HTTP proxy mode? */
   else if (sock->http_proxy)
     {
-      ASSERT (sock->info.proto == PROTO_TCP_CLIENT && sock->info.af == AF_INET);
+      ASSERT (sock->info.proto == PROTO_TCP_CLIENT);
       ASSERT (!sock->inetd);
 
       /* the proxy server */
@@ -1435,7 +1435,6 @@ link_socket_init_phase1 (struct link_socket *sock,
   /* or in Socks proxy mode? */
   else if (sock->socks_proxy)
     {
-      ASSERT (sock->info.af == AF_INET);
       ASSERT (!sock->inetd);
 
       /* the proxy server */
@@ -1454,7 +1453,7 @@ link_socket_init_phase1 (struct link_socket *sock,
     }
 
   /* bind behavior for TCP server vs. client */
-  if (sock->info.proto == PROTO_TCP_SERVER && sock->info.af==AF_INET)
+  if (sock->info.proto == PROTO_TCP_SERVER)
     {
       if (sock->mode == LS_MODE_TCP_ACCEPT_FROM)
        sock->bind_local = false;