summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_gre.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2004-01-26 12:33:56 +0000
committersobomax <sobomax@FreeBSD.org>2004-01-26 12:33:56 +0000
commit7029665c48134fdfa0d0a791cad666b9395e1437 (patch)
tree5c5c96b17f9d310360115eac89b4737a0956a175 /sys/netinet/ip_gre.c
parentcbc4150e39de8a374e24f7dd77eaace267720350 (diff)
downloadFreeBSD-src-7029665c48134fdfa0d0a791cad666b9395e1437.zip
FreeBSD-src-7029665c48134fdfa0d0a791cad666b9395e1437.tar.gz
Add support for WCCPv2. It should be enablem manually using link2
ifconfig(8) flag since header for version 2 is the same but IP payload is prepended with additional 4-bytes field. Inspired by: Roman Synyuk <roman@univ.kiev.ua> MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/ip_gre.c')
-rw-r--r--sys/netinet/ip_gre.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index 1abef16..ad9ed30 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -177,9 +177,12 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto)
hlen += 4;
switch (ntohs(gip->gi_ptype)) { /* ethertypes */
- case ETHERTYPE_IP: /* shouldn't need a schednetisr(), as */
- case WCCP_PROTOCOL_TYPE: /* we are in ip_input */
- isr = NETISR_IP;
+ case WCCP_PROTOCOL_TYPE:
+ if (sc->wccp_ver == WCCP_V2)
+ hlen += 4;
+ /* FALLTHROUGH */
+ case ETHERTYPE_IP: /* shouldn't need a schednetisr(), */
+ isr = NETISR_IP;/* as we are in ip_input */
break;
#ifdef NETATALK
case ETHERTYPE_ATALK:
OpenPOWER on IntegriCloud