From 7029665c48134fdfa0d0a791cad666b9395e1437 Mon Sep 17 00:00:00 2001 From: sobomax Date: Mon, 26 Jan 2004 12:33:56 +0000 Subject: 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 MFC after: 2 weeks --- sys/netinet/ip_gre.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/netinet') 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: -- cgit v1.1