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);