Hi Robin,
Would you mind quickly checking to see if this patch fixes it?
If it does I'll commit to the CVS tree.
Thanks!
Adrian
----- Forwarded message from Robert Collins <robert.collins@itdomain.com.au> -----
Subject: Re: [robin.garner@iname.com: authenticateAuthUserRequestSetIp]
From: Robert Collins <robert.collins@itdomain.com.au>
To: squid-dev@squid-cache.org
X-Mailer: Evolution/0.12 (Preview Release)
Date: 06 Aug 2001 18:42:37 +1000
Sorry, too eager with email there.
Could someone please commit the following to HEAD?
It corrects the bug Robin reported.
Rob
Index: authenticate.c
===================================================================
RCS file: /cvsroot/squid/squid/src/authenticate.c,v
retrieving revision 1.1.1.3.12.47
diff -u -p -r1.1.1.3.12.47 authenticate.c
--- authenticate.c 2001/08/03 08:28:09 1.1.1.3.12.47
+++ authenticate.c 2001/08/06 08:38:48
@@ -247,6 +247,7 @@ authenticateAuthUserRequestSetIp(auth_us
auth_user_ip_t *ipdata, *tempnode;
auth_user_t *auth_user;
char *ip1;
+ int found = 0;
CBDATA_INIT_TYPE (auth_user_ip_t);
if (!auth_user_request->auth_user)
return;
@@ -260,6 +261,7 @@ authenticateAuthUserRequestSetIp(auth_us
/* walk the ip list */
if (ipdata->ipaddr.s_addr == ipaddr.s_addr) {
/* This ip has alreadu been seen. */
+ found = 1;
/* update IP ttl */
ipdata->ip_expiretime = squid_curtime;
} else if (ipdata->ip_expiretime + Config.authenticateIpTTL < squid_curtime) {
@@ -272,6 +274,9 @@ authenticateAuthUserRequestSetIp(auth_us
}
ipdata = tempnode;
}
+
+ if (!found)
+ return;
/* This ip is not in the seen list */
ipdata = cbdataAlloc (auth_user_ip_t);
----- End forwarded message -----
-- Adrian Chadd Yeah, for me its (XML) like the movie Titanic. <adrian@creative.net.au> Everybody loves it. I want to be different, so I hate it. --Duane WesselsReceived on Mon Aug 06 2001 - 03:58:23 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:10 MST