gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 63/116: connect: store IPv6 connection status after


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 63/116: connect: store IPv6 connection status after valid connection
Date: Tue, 05 Dec 2017 14:51:33 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 6b12beb25a8bc66d724a4d7808a4eee97b865e02
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sat Nov 4 13:32:14 2017 +0100

    connect: store IPv6 connection status after valid connection
    
    ... previously it would store it already in the happy eyeballs stage
    which could lead to the IPv6 bit being set for an IPv4 connection,
    leading to curl not wanting to do EPSV=>PASV for FTP transfers.
    
    Closes #2053
---
 lib/connect.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/connect.c b/lib/connect.c
index 218bbcc78..84a63aefd 100755
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -785,6 +785,9 @@ CURLcode Curl_is_connected(struct connectdata *conn,
         conn->sock[sockindex] = conn->tempsock[i];
         conn->ip_addr = conn->tempaddr[i];
         conn->tempsock[i] = CURL_SOCKET_BAD;
+#ifdef ENABLE_IPV6
+        conn->bits.ipv6 = (conn->ip_addr->ai_family == AF_INET6)?TRUE:FALSE;
+#endif
 
         /* close the other socket, if open */
         if(conn->tempsock[other] != CURL_SOCKET_BAD) {
@@ -1097,10 +1100,6 @@ static CURLcode singleipconnect(struct connectdata *conn,
     return CURLE_OK;
   }
 
-#ifdef ENABLE_IPV6
-  conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE;
-#endif
-
   if(-1 == rc) {
     switch(error) {
     case EINPROGRESS:

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]