From: Amos Jeffries Date: Wed, 28 Apr 2010 00:35:50 +0000 (-0600) Subject: Author: Amos Jeffries X-Git-Tag: SQUID_3_1_2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31c7f042b4e208392a9dabfb822d9ec953acd9e9;p=thirdparty%2Fsquid.git Author: Amos Jeffries Author: gkeeling Bug 2860: WCCPv1 broken in 3.1 --- diff --git a/src/wccp.cc b/src/wccp.cc index ff70e77ad9..5221bef62d 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -59,18 +59,18 @@ struct wccp_here_i_am_t { }; struct wccp_cache_entry_t { - IpAddress ip_addr; + struct in_addr ip_addr; int revision; char hash[WCCP_HASH_SIZE]; int reserved; }; struct wccp_i_see_you_t { - int type; - int version; - int change; - int id; - int number; + int32_t type; + int32_t version; + int32_t change; + int32_t id; + int32_t number; struct wccp_cache_entry_t wccp_cache_entry[WCCP_ACTIVE_CACHES]; }; @@ -288,7 +288,7 @@ wccpLowestIP(void) for (loop = 0; loop < (unsigned) ntohl(wccp_i_see_you.number); loop++) { assert(loop < WCCP_ACTIVE_CACHES); - if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr < local_ip) + if (local_ip > wccp_i_see_you.wccp_cache_entry[loop].ip_addr) return 0; if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr == local_ip)