if (clientdbEstablished(details->remote, 0) > Config.client_ip_max_connections) {
debugs(50, DBG_IMPORTANT, "WARNING: " << details->remote << " attempting more than " << Config.client_ip_max_connections << " connections.");
Ip::Address::FreeAddr(gai);
+ PROF_stop(comm_accept);
return Comm::COMM_ERROR;
}
}
if (getsockname(sock, gai->ai_addr, &gai->ai_addrlen) != 0) {
debugs(50, DBG_IMPORTANT, "ERROR: getsockname() failed to locate local-IP on " << details << ": " << xstrerror());
Ip::Address::FreeAddr(gai);
+ PROF_stop(comm_accept);
return Comm::COMM_ERROR;
}
details->local = *gai;
// Perform NAT or TPROXY operations to retrieve the real client/dest IP addresses
if (conn->flags&(COMM_TRANSPARENT|COMM_INTERCEPTION) && !Ip::Interceptor.Lookup(details, conn)) {
// Failed.
+ PROF_stop(comm_accept);
return Comm::COMM_ERROR;
}