From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 12 09:40:23 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0C6516A4CE for ; Fri, 12 Dec 2003 09:40:22 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C665043D32 for ; Fri, 12 Dec 2003 09:40:18 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) hBCHeIFR084667 for ; Fri, 12 Dec 2003 09:40:18 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id hBCHeI4U084666; Fri, 12 Dec 2003 09:40:18 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 12 Dec 2003 09:40:18 -0800 (PST) Resent-Message-Id: <200312121740.hBCHeI4U084666@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Narron Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1B4F16A4CE for ; Fri, 12 Dec 2003 09:35:46 -0800 (PST) Received: from radius2.cdsinet.net (radius2.cdsinet.net [65.167.168.13]) by mx1.FreeBSD.org (Postfix) with SMTP id EC30F43D1D for ; Fri, 12 Dec 2003 09:35:45 -0800 (PST) (envelope-from zeek@radius2.cdsinet.net) Received: (qmail 78359 invoked by uid 1000); 12 Dec 2003 17:35:50 -0000 Message-Id: <20031212173550.78358.qmail@radius2.cdsinet.net> Date: 12 Dec 2003 17:35:50 -0000 From: John Narron To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/60183: No WCCPv2 support in gre X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John Narron List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 17:40:23 -0000 >Number: 60183 >Category: kern >Synopsis: No WCCPv2 support in gre >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Dec 12 09:40:18 PST 2003 >Closed-Date: >Last-Modified: >Originator: John Narron >Release: FreeBSD 5.1-RELEASE-p11 i386 >Organization: CDS/CDSinet, LLC >Environment: System: FreeBSD radius2.cdsinet.net 5.1-RELEASE-p11 FreeBSD 5.1-RELEASE-p11 #14: Thu Dec 11 16:16:13 CST 2003 zeek@radius2.cdsinet.net:/usr/obj/usr/src/sys/RADIUS i386 >Description: The gre driver has support for WCCP, but lacks WCCPv2 support. WCCPv2 packets, when arriving on a gre device, appear as IPv0 packets. >How-To-Repeat: Can't repeat something that isn't supported now can we? >Fix: Attached is a patch to check if m->m_data+hlen is a IPv4 header. If so its assumed the packet is WCCPv1, otherwise its WCCPv2 and hlen is incremented by 4. --- ip_gre.c Fri Dec 12 16:50:49 2003 +++ ip_gre.c.wccpv2 Fri Dec 12 16:58:13 2003 @@ -172,8 +172,26 @@ switch (ntohs(gip->gi_ptype)) { /* ethertypes */ case ETHERTYPE_IP: /* shouldn't need a schednetisr(), as */ + isr = NETISR_IP; + break; case WCCP_PROTOCOL_TYPE: /* we are in ip_input */ - isr = NETISR_IP; + isr = NETISR_IP; + /* + * jnarron@cdsinet.net + * WCCPv1 and WCCPv2 packet encapsulations differ by 4 octets + * WCCPv2 adds: + * octet 0: Flags + * octet 1: Service ID + * octet 2: Reserved? + * octet 3: Primary bucket index + * + * So far I haven't found any use for those 4 octets, so for now + * we just strip them out and move on. + */ + + if(!((*(m->m_data + hlen)) & 0x40)) + hlen += 4; + break; #ifdef NETATALK case ETHERTYPE_ATALK: >Release-Note: >Audit-Trail: >Unformatted: