]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Wrap extra IPv6 comm failover cases properly.
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 22 May 2010 05:59:58 +0000 (17:59 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 22 May 2010 05:59:58 +0000 (17:59 +1200)
src/comm.cc

index 3c0d020dce4b0454bdc40355521c14ef843395f5..99245001bbbc91cdf4977893d5e4f765714aeb11 100644 (file)
@@ -1221,8 +1221,9 @@ comm_connect_addr(int sock, const Ip::Address &address)
 
     assert(address.GetPort() != 0);
 
-    debugs(5, 9, "comm_connect_addr: connecting socket " << sock << " to " << address << " (want family: " << F->sock_family << ")");
+    debugs(5, 9, HERE << "connecting socket FD " << sock << " to " << address << " (want family: " << F->sock_family << ")");
 
+#if USE_IPV6
     /* Handle IPv6 over IPv4-only socket case.
      * this case must presently be handled here since the GetAddrInfo asserts on bad mappings.
      * NP: because commResetFD is private to ConnStateData we have to return an error and
@@ -1244,6 +1245,7 @@ comm_connect_addr(int sock, const Ip::Address &address)
         errno = ENETUNREACH;
         return COMM_ERR_PROTOCOL;
     }
+#endif /* USE_IPV6 */
 
     address.GetAddrInfo(AI, F->sock_family);