[steven.wilton@team.eftel.com: WCCP Patch]

From: Adrian Chadd <adrian@dont-contact.us>
Date: Mon, 20 May 2002 14:13:59 +0800

Hi guys,

can someone with a bit more time than I take a squizz at this? :)

Adrian

----- Forwarded message from Steven Wilton <steven.wilton@team.eftel.com> -----

X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 20 May 2002 14:11:43 +0800
To: adrian@creative.net.au
From: Steven Wilton <steven.wilton@team.eftel.com>
Subject: WCCP Patch

Adrian,

The attached patch appears to have fixed the problem we were having with
squids showing as being usable on the wccp router, but not being allocated
any part of the hash. It looks like squid was ignoring the wrong packet
when more than one squid came online within a short space of time. The
last part of the patch will stop squid from leaving part of the wccp hash
unallocated.

It has been running fine on our system for the past 5 days, and appears to
have stopped the problem at this stage.

Steven

--- squid-2.4.4/src/wccp.c.old Wed May 15 09:07:45 2002
+++ squid-2.4.4/src/wccp.c Mon May 20 09:40:22 2002
@@ -84,6 +84,7 @@
 static struct wccp_here_i_am_t wccp_here_i_am;
 static struct wccp_i_see_you_t wccp_i_see_you;
 static int change;
+static int number_caches;
 static struct in_addr local_ip;
 
 static PF wccpHandleUdp;
@@ -233,7 +234,7 @@
         return;
     if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU)
         return;
- if (!change) {
+ if ((!change) && (number_caches == ntohl(wccp_i_see_you.number)) {
         change = wccp_i_see_you.change;
         return;
     }
@@ -278,7 +279,6 @@
     char *buckets;
     int buckets_per_cache;
     int loop;
- int number_caches;
     int bucket = 0;
     int *caches;
     int cache_len;
@@ -311,6 +311,9 @@
             assert(bucket < WCCP_BUCKETS);
             buckets[bucket++] = loop;
         }
+ }
+ while(bucket < WCCP_BUCKETS ) {
+ buckets[bucket++] = number_caches-1;
     }
     wccp_assign_bucket->type = htonl(WCCP_ASSIGN_BUCKET);
     wccp_assign_bucket->id = wccp_i_see_you.id;

----- End forwarded message -----

-- 
Adrian Chadd			"I'm really not a very complex person,
<adrian@creative.net.au>	  I like to deal with situations by
				    kicking people" - Ashley Penney
Received on Mon May 20 2002 - 00:14:09 MDT

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