From: Henrik Nordstrom Date: Fri, 14 May 2010 03:58:00 +0000 (+0200) Subject: Cleanup patch X-Git-Tag: SQUID_3_1_4~26^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e17a3c3df5f9d265e42f3ee46813ee096718ec6;p=thirdparty%2Fsquid.git Cleanup patch --- diff --git a/src/comm.cc b/src/comm.cc index b453dfd482..30931d3a6d 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -980,7 +980,9 @@ ConnectStateData::commResetFD() struct addrinfo *AI = NULL; F->local_addr.GetAddrInfo(AI); - int fd2 = socket(AI->ai_family, AI->ai_socktype, AI->ai_protocol); + int new_family = AI->ai_family; + + int fd2 = socket(new_family, AI->ai_socktype, AI->ai_protocol); if (fd2 < 0) { debugs(5, DBG_CRITICAL, HERE << "WARNING: FD " << fd2 << " socket failed to allocate: " << xstrerror()); @@ -1015,7 +1017,8 @@ ConnectStateData::commResetFD() close(fd2); - F->sock_family = AI->ai_family; + /* INET6: copy the new sockets family type to the FDE table */ + F->sock_family = new_family; F->flags.called_connect = 0;