From: Amos Jeffries Date: Sat, 6 Dec 2014 06:42:33 +0000 (-0800) Subject: Docs: drop old README.wccpv2 X-Git-Tag: merge-candidate-3-v1~455 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a527a95cfbf66a76222ac76e5f1f8058c7c69aaa;p=thirdparty%2Fsquid.git Docs: drop old README.wccpv2 --- diff --git a/doc/README.wccpv2 b/doc/README.wccpv2 deleted file mode 100644 index a3a7f2fe45..0000000000 --- a/doc/README.wccpv2 +++ /dev/null @@ -1,62 +0,0 @@ -This version of squid has been patched with the wccpv2 support patch. To -enable this option, use the --enable-wccpv2 option on the configure script. - -Wccpv2 allows a single cache to associate itself with multiple routers, and -also allows multiple wccp services to be defined. The other advantage of -wccpv2 is that the cisco IOS uses CEF to switch the packets. - -Example simple web cache ------------------------- - -Internet <-> fa0/0 2621 fa0/1 <-> cache, internal network - -squid.conf: - -wccp2_router 192.168.2.1:2048 -wccp2_version 4 -wccp2_forwarding_method 1 -wccp2_return_method 1 -wccp2_service standard 0 - -Router config: - -ip wccp web-cache -! -interface FastEthernet0/0 - description uplink - ip address 192.168.1.200 255.255.255.0 - ip wccp web-cache redirect out - duplex auto - speed auto -! -interface FastEthernet0/1 - description local network - ip address 192.168.2.1 255.255.255.0 - duplex auto - speed auto -! - -Note the cache is on the internal network (Fa0/1), the interception occurs -on the uplink interface(0/0). - -Linux (Kernel 2.6.10, i386) side of things: - -#!/bin/sh -echo "1" > /proc/sys/net/ipv4/ip_forward -echo "0" > /proc/sys/net/ipv4/conf/all/rp_filter -iptunnel add gre1 mode gre remote 192.168.2.1 local 192.168.2.2 dev eth0 -ifconfig gre1 up 127.0.0.2 -iptables -t nat -F -# iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 -iptables -t nat -A PREROUTING -i gre1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.2:3128 - - -TODO ----- - -* The wccp2 router configuration need to have a better configuration interface - (it currently uses ip:port when only the ip address is needed). -* A shutting-down cache should generate a removal query, informing the router - (and therefore the caches in the group) that this cache is going - away and no new traffic should be forwarded to it. -* Some more documentation, examples, etc. diff --git a/src/wccp2.cc b/src/wccp2.cc index 9166cca594..c20608ea84 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -1050,13 +1050,18 @@ wccp2ConnectionClose(void) return; } + /* TODO A shutting-down cache should generate a removal query, informing the router + * (and therefore the caches in the group) that this cache is going + * away and no new traffic should be forwarded to it. + */ + if (theWccp2Connection > -1) { debugs(80, DBG_IMPORTANT, "FD " << theWccp2Connection << " Closing WCCPv2 socket"); comm_close(theWccp2Connection); theWccp2Connection = -1; } - /* for each router on each service send a packet */ + /* free all stored router state */ service_list_ptr = wccp2_service_list_head; while (service_list_ptr != NULL) {