From owner-freebsd-net Wed Mar 1 13:32:40 2000 Delivered-To: freebsd-net@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 5D74637BAFC for ; Wed, 1 Mar 2000 13:32:34 -0800 (PST) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id NAA71857; Wed, 1 Mar 2000 13:31:27 -0800 (PST) From: Archie Cobbs Message-Id: <200003012131.NAA71857@bubba.whistle.com> Subject: Re: GRE Support in 4.X ??? In-Reply-To: <200003012104.QAA64880@khavrinen.lcs.mit.edu> from Garrett Wollman at "Mar 1, 2000 04:04:38 pm" To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Date: Wed, 1 Mar 2000 13:31:27 -0800 (PST) Cc: julian@elischer.org, ales@megared.net.mx, net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Garrett Wollman writes: > > Sorry, I don't understand your point here. What does TCP > > have to do with anything? > > Look at the code for a moment: > > if (ntohl(gre->type) != GRE_PROTOCOL_TYPE) { > rip_input(m, iphlen); > return; > } > > So, if it's not the protocol we're expecting, we just punt it to the > SOCK_RAW interface. > > len = m->m_len - len; > if (ip->ip_len != len) { > if (len > ip->ip_len || len < sizeof(struct ip)) { > m_freem(m); > return; > } > m_adj(m, iphlen + sizeof(struct gre)); > } > ip_input(m); > > Otherwise, decapsulate the packet and hand it directly to the IP layer > to be acted upon as if it had been received directly. The user then > configures IPFIREWALL_FORWARD to send the packet to lo0 where it gets > interpreted by the local protocol stack. What is your opinion about adding GRE support to the kernel? I.e., should we do it and if so how should it work? Should a process "bind" to a specific protocol? Should certain protocols that are already defined (like the above encapsulation) be handled automatically? Etc.. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message