--------------------- PatchSet 4900 Date: 2007/06/29 17:34:58 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fix protocol type of remote clients not being saved properly. Members: src/comm.cc:1.47.2.38->1.47.2.39 Index: squid3/src/comm.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.cc,v retrieving revision 1.47.2.38 retrieving revision 1.47.2.39 diff -u -r1.47.2.38 -r1.47.2.39 --- squid3/src/comm.cc 29 Jun 2007 16:29:35 -0000 1.47.2.38 +++ squid3/src/comm.cc 29 Jun 2007 17:34:58 -0000 1.47.2.39 @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.47.2.38 2007/06/29 16:29:35 amosjeffries Exp $ + * $Id: comm.cc,v 1.47.2.39 2007/06/29 17:34:58 amosjeffries Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1383,7 +1383,7 @@ status = COMM_INPROGRESS; else #if USE_IPV6 - if( S.IsIPv4() && F->sock_family == AF_INET6 ) { + if( address.IsIPv4() && F->sock_family == AF_INET6 ) { /* failover to trying IPv4-only link if an IPv6 one fails */ /* to catch the edge case of apps listening on IPv4-localhost */ @@ -1447,6 +1447,16 @@ } } +#if USE_IPV6 + if(gai->ai_addrlen == sizeof(struct sockaddr_in6)) { + gai->ai_family = ((struct sockaddr_in6*)gai->ai_addr)->sin6_family; + } + else +#endif + { + gai->ai_family = ((struct sockaddr_in*)gai->ai_addr)->sin_family; + } + details.peer = *gai; details.me.SetEmpty();