From: Amos Jeffries Date: Mon, 13 May 2013 16:21:23 +0000 (-0600) Subject: Remove origin_tries limiter on forwarding X-Git-Tag: SQUID_3_4_0_1~149 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb0fa5ba276542fb1d0b7c9a37be4bc5412477e8;p=thirdparty%2Fsquid.git Remove origin_tries limiter on forwarding This limit seems to have been set to prevent large amount of looping when DIRECT attempts fail under the old model of constant DNS lookups and retries. However it is hard-coded and has no configuration knob visible. Under the curent model of all destinations being enumerated once and tried sequentially this protection would seem to be no longer necessary and somewhat harmful as it will be preventing retries reaching destinations with more than 2 unreachable IPs (think 3 IPv6 and an IPv4 on IPv4-only network). --- diff --git a/src/forward.cc b/src/forward.cc index 8ada85e5c0..04efdde137 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -555,9 +555,6 @@ FwdState::checkRetry() if (n_tries > 10) return false; - if (origin_tries > 2) - return false; - if (squid_curtime - start_t > Config.Timeout.forward) return false; @@ -1163,9 +1160,6 @@ FwdState::connectStart() debugs(17, 3, HERE << "reusing pconn " << serverConnection()); ++n_tries; - if (!serverConnection()->getPeer()) - ++origin_tries; - comm_add_close_handler(serverConnection()->fd, fwdServerClosedWrapper, this); /* Update server side TOS and Netfilter mark on the connection. */ @@ -1364,9 +1358,6 @@ FwdState::reforward() if (n_tries > Config.forward_max_tries) return 0; - if (origin_tries > 1) - return 0; - if (request->bodyNibbled()) return 0; diff --git a/src/forward.h b/src/forward.h index 22eadbfb76..239888537c 100644 --- a/src/forward.h +++ b/src/forward.h @@ -120,7 +120,6 @@ private: Comm::ConnectionPointer clientConn; ///< a possibly open connection to the client. time_t start_t; int n_tries; - int origin_tries; // AsyncCalls which we set and may need cancelling. struct {