From: Henrik Nordstrom Date: Fri, 14 May 2010 01:38:27 +0000 (+0200) Subject: indented X-Git-Tag: SQUID_3_1_4~26^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=242a90e54fb79d0cf7ed3a0f1311274150f1e0a7;p=thirdparty%2Fsquid.git indented --- diff --git a/src/comm.cc b/src/comm.cc index 6a44e60e88..237b318020 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1234,6 +1234,7 @@ comm_connect_addr(int sock, const IpAddress &address) * trust its handled properly. */ if (F->sock_family == AF_INET && !address.IsIPv4()) { + errno = ENETUNREACH; return COMM_ERR_PROTOCOL; } @@ -1245,6 +1246,7 @@ comm_connect_addr(int sock, const IpAddress &address) * condition here is simple. */ if (!F->local_addr.IsIPv4() && address.IsIPv4()) { + errno = ENETUNREACH; return COMM_ERR_PROTOCOL; } @@ -1341,9 +1343,9 @@ comm_connect_addr(int sock, const IpAddress &address) else if (ignoreErrno(errno)) status = COMM_INPROGRESS; else if (errno == EAFNOSUPPORT || errno == EINVAL) - return COMM_ERR_PROTOCOL; + return COMM_ERR_PROTOCOL; else - return COMM_ERROR; + return COMM_ERROR; address.NtoA(F->ipaddr, MAX_IPSTRLEN);