Re: never_direct, always_direct [possible bug, fix]

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 18 Mar 1999 21:54:09 +0100

Oskar Pearson wrote:

> Sorry: I need some more clarification about the never_direct and
> always_direct tags...

> Let's say that squid accepts a request: does it create the ICP
> packets, send them off, wait for responses and then check the rules.

ICP is not used if always_direct is allow. No point in using ICP if it
is not allowable to use a peer to satisfy the request.

Hmm.. I think your questiong brought my attention to a couple bugs in
never_direct selection. It seems that Netdb could make the request
bypass never_direct, and that "source ping" pings the origin server
regardless of never_direct.

Possible fixes to the selection problem (all in peer_select.c):
a) Add the following at the head of peerCheckNetdbDirect
    if (psstate->direct == DIRECT_NO)
        return 0;
b) Guard the peerCheckNetdbDirect call in peerGetSomeNeighborReplies
from
    if (peerCheckNetdbDirect(ps)) {
to
    if (ps->direct != DIRECT_NO && peerCheckNetdbDirect(ps)) {

I have not found a obvious cure to the source ping problem.

/Henrik
Received on Tue Jul 29 2003 - 13:15:57 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:04 MST