]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Mark Nottingham <mnot@pobox.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 8 May 2009 10:16:07 +0000 (22:16 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 8 May 2009 10:16:07 +0000 (22:16 +1200)
Bug 2632: Make number of reforwarding tries configurable

doc/release-notes/release-3.1.sgml
src/cf.data.pre
src/forward.cc
src/structs.h

index 2c51e36a9c0d9ee82005b8d840309d20b6525250..7508a7b6c27701f6dc0a438c366f8cdb6c9f8a51 100644 (file)
@@ -648,6 +648,10 @@ This section gives a thorough account of those changes in three categories:
        Requires ftp_passive to be ON (default)
        </verb>
 
+       <tag>forward_max_tries</tag>
+       <p>Controls how many different forward paths Squid will try
+       before giving up. Default: 10
+
        <tag>include</tag>
        <p>New option to import entire secondary configuration files into squid.conf.
        <verb>
index ade142968c7f457ca373c50a30d07fd5a0bf4b72..f60b9023111b0fbeeb95763111e2fe4a380b9b66 100644 (file)
@@ -1941,6 +1941,15 @@ DOC_START
        instead of to your parents.
 DOC_END
 
+NAME: forward_max_tries
+DEFAULT: 10
+TYPE: int
+LOC: Config.forward_max_tries
+DOC_START
+       Controls how many different forward paths Squid will try
+       before giving up. See also forward_timeout.
+DOC_END
+
 NAME: hierarchy_stoplist
 TYPE: wordlist
 DEFAULT: none
index 076b72aa84f0cfc118c76e1dcbea4cea4ed8a321..1cab5499593b9cb5e5dd25595365ed895dcd8468 100644 (file)
@@ -1095,7 +1095,7 @@ FwdState::reforward()
         return 0;
     }
 
-    if (n_tries > 9)
+    if (n_tries > Config.forward_max_tries)
         return 0;
 
     if (origin_tries > 1)
index 2c1eae4c82caef5ab8519a2cb40971e36263af54..f28c9cca396e07c9142041591cb39f495c74901b 100644 (file)
@@ -444,6 +444,8 @@ struct SquidConfig {
         int WIN32_IpAddrChangeMonitor;
     } onoff;
 
+    int forward_max_tries;
+
     class ACL *aclList;
 
     struct {