From 437823b4d59098b87a8bca951a40e9d6f5d36171 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 8 May 2009 22:16:07 +1200 Subject: [PATCH] Author: Mark Nottingham Bug 2632: Make number of reforwarding tries configurable --- doc/release-notes/release-3.1.sgml | 4 ++++ src/cf.data.pre | 9 +++++++++ src/forward.cc | 2 +- src/structs.h | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/release-3.1.sgml b/doc/release-notes/release-3.1.sgml index 2c51e36a9c..7508a7b6c2 100644 --- a/doc/release-notes/release-3.1.sgml +++ b/doc/release-notes/release-3.1.sgml @@ -648,6 +648,10 @@ This section gives a thorough account of those changes in three categories: Requires ftp_passive to be ON (default) + forward_max_tries +

Controls how many different forward paths Squid will try + before giving up. Default: 10 + include

New option to import entire secondary configuration files into squid.conf. diff --git a/src/cf.data.pre b/src/cf.data.pre index ade142968c..f60b902311 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -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 diff --git a/src/forward.cc b/src/forward.cc index 076b72aa84..1cab549959 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -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) diff --git a/src/structs.h b/src/structs.h index 2c1eae4c82..f28c9cca39 100644 --- a/src/structs.h +++ b/src/structs.h @@ -444,6 +444,8 @@ struct SquidConfig { int WIN32_IpAddrChangeMonitor; } onoff; + int forward_max_tries; + class ACL *aclList; struct { -- 2.47.2