From: "James Ots " Date: Wed, 05 Feb 2003 07:44:21 -0000 Hi, I've updated the patch for squid, so that it works with 2.5.STABLE1. It's only really the line numbers that have changed. To apply it, save the patch in the squid-2.5.STABLE1 directory as dans.patch and run patch -Np1 < dans.patch -- Cheers James Ots www.jamesots.com --- squid-2.5.STABLE1/src/client_side.c Mon Sep 23 07:04:03 2002 +++ squid-2.5.STABLE1/src/client_side.c Wed Feb 5 10:35:45 2003 @@ -85,6 +85,8 @@ #define FAILURE_MODE_TIME 300 +#define DANSGUARDIAN_IP_FORWARD + /* Local functions */ static CWCB clientWriteComplete; @@ -771,6 +773,9 @@ clientHttpRequest **H; ConnStateData *conn = http->conn; StoreEntry *e; +#ifdef DANSGUARDIAN_IP_FORWARD + String s; +#endif request_t *request = http->request; MemObject *mem = NULL; debug(33, 3) ("httpRequestFree: %s\n", storeUrl(http->entry)); @@ -795,6 +800,13 @@ http->al.http.content_type = strBuf(mem->reply->content_type); } http->al.cache.caddr = conn->log_addr; +#ifdef DANSGUARDIAN_IP_FORWARD + if (httpHeaderHas(&request->header, HDR_X_FORWARDED_FOR)) { + s = httpHeaderGetList(&request->header, HDR_X_FORWARDED_FOR); + if (! inet_pton (AF_INET,strBuf(s),&http->al.cache.caddr)) + http->al.cache.caddr = conn->log_addr; + } +#endif http->al.cache.size = http->out.size; http->al.cache.code = http->log_type; http->al.cache.msec = tvSubMsec(http->start, current_time); ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/ngFolB/TM ---------------------------------------------------------------------~-> Please understand the correct way of posting and replying to mailing lists. See: http://www.ptialaska.net/~kmorgan/nquote.html http://www.usenet.org.uk/ukpost.html http://www.uwasa.fi/~ts/http/quote.html You may unsubscribe by sending an email to: dansguardian-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/