From owner-freebsd-net@FreeBSD.ORG Wed Jan 14 06:06:19 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CD9B16A4CE for ; Wed, 14 Jan 2004 06:06:19 -0800 (PST) Received: from smtp01.uc3m.es (smtp01.uc3m.es [163.117.136.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id D233A43D60 for ; Wed, 14 Jan 2004 06:06:14 -0800 (PST) (envelope-from jrh@it.uc3m.es) Received: from smtp01.uc3m.es (localhost [127.0.0.1]) by localhost.uc3m.es (Postfix) with ESMTP id 4629A57AD; Wed, 14 Jan 2004 15:06:13 +0100 (CET) Received: from cimborrio (cimborrio.it.uc3m.es [163.117.139.95]) by smtp01.uc3m.es (Postfix) with ESMTP id 29663579B; Wed, 14 Jan 2004 15:06:13 +0100 (CET) From: Juan Rodriguez Hervella Organization: UC3M To: Luigi Rizzo , net@freebsd.org Date: Wed, 14 Jan 2004 15:06:10 +0100 User-Agent: KMail/1.5.4 References: <20040114012913.A91612@xorpc.icir.org> In-Reply-To: <20040114012913.A91612@xorpc.icir.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401141506.11400.jrh@it.uc3m.es> Subject: Re: 'ipv6' type in /etc/protocols ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2004 14:06:19 -0000 On Wednesday 14 January 2004 10:29, Luigi Rizzo wrote: > hi, > in implementing ipv6 support for ipfw2, i hit the following > problem: /etc/protocols has an entry: > > ipv6 41 IPV6 # ipv6 > > which is somewhat confusing for the parser -- if you > type something like > > ipfw add allow ipv6 from foo to bar > > the "ipv6" will match in the call to getprotobyname() and > the above will be translated into a rule that matches packets with > ip->ip_proto == 41 (6 is TCP, 17 is UDP, etc.), while i presume > that what one would really want with the above notation is to > match IPv6 packets, i.e. > > + layer2 packets with mac-type 0x86dd (ipv6) > + layer3 packets with ip->ip_v == 6 > > Now, i can put a special case for the keyword 'ipv6', but > I wonder, what do we do with ip->ip_proto == 41 ? Does it > make sense to handle this request ? I think that it makes sense if you want to parse IPv6 in IPv4 packets. > And in this case, > what name do we use for it to avoid conflicts ? Ipv6-encap ? ipv6-in-ipv4 ? ipv64 ? .....I dont know... I agree with you that if somebody specifies the word "Ipv6", what he/she wants to is to get normal IPv6 packets, not IPv6 in IPv4 packets....imho. > Looking at /sys/netinet/in.h, it appears that > ip_proto == 4 and 41 refer to encapsulations of ipv4 and ipv6 > into ip... You are right. -- ****** JFRH ****** In seeking the unattainable, simplicity only gets in the way. -- Epigrams in Programming, ACM SIGPLAN Sept. 1982