23
23
* it under the terms of the GNU General Public License as published by
24
24
* the Free Software Foundation; either version 2 of the License, or
25
25
* (at your option) any later version.
27
27
* This program is distributed in the hope that it will be useful,
28
28
* but WITHOUT ANY WARRANTY; without even the implied warranty of
29
29
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
30
* GNU General Public License for more details.
32
32
* You should have received a copy of the GNU General Public License
33
33
* along with this program; if not, write to the Free Software
34
34
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
81
81
DelayId::operator == (DelayId const &rhs) const
83
83
/* Doesn't compare composites properly....
84
* only use to test against default ID's
84
* only use to test against default ID's
86
86
return pool_ == rhs.pool_ && compositeId == rhs.compositeId;
101
101
r = http->request;
103
if (r->client_addr.s_addr == INADDR_BROADCAST) {
104
debugs(77, 2, "delayClient: WARNING: Called with 'allones' address, ignoring");
103
if (r->client_addr.IsNoAddr()) {
104
debugs(77, 2, "delayClient: WARNING: Called with 'NO_ADDR' address, ignoring");
105
105
return DelayId();
108
108
for (pool = 0; pool < DelayPools::pools(); pool++) {
110
ch.src_addr = r->client_addr;
110
/* pools require explicit 'allow' to assign a client into them */
111
if (!DelayPools::delay_data[pool].access) {
112
debugs(77, DBG_IMPORTANT, "delay_pool " << pool <<
113
" has no delay_access configured. This means that no clients will ever use it.");
117
ACLFilledChecklist ch(DelayPools::delay_data[pool].access, r, NULL);
118
#if FOLLOW_X_FORWARDED_FOR
119
if (Config.onoff.delay_pool_uses_indirect_client)
120
ch.src_addr = r->indirect_client_addr;
122
#endif /* FOLLOW_X_FORWARDED_FOR */
123
ch.src_addr = r->client_addr;
111
124
ch.my_addr = r->my_addr;
112
ch.my_port = r->my_port;
114
126
if (http->getConn() != NULL)
115
127
ch.conn(http->getConn());
117
ch.request = HTTPMSGLOCK(r);
119
ch.accessList = cbdataReference(DelayPools::delay_data[pool].access);
121
/* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
123
if (DelayPools::delay_data[pool].theComposite().getRaw() &&
129
if (DelayPools::delay_data[pool].theComposite().getRaw() && ch.fastCheck()) {
125
131
DelayId result (pool + 1);
126
132
CompositePoolNode::CompositeSelectionDetails details;
127
133
details.src_addr = ch.src_addr;