From owner-freebsd-net@FreeBSD.ORG Tue May 13 14:38:02 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F123106566B for ; Tue, 13 May 2008 14:38:02 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id 470F48FC18 for ; Tue, 13 May 2008 14:38:01 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id DA3E82218A7F; Wed, 14 May 2008 00:38:00 +1000 (EST) X-Viruscan-Id: <4829A7C800004EB4ACB2AF@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id 9A65F21B2CCF; Wed, 14 May 2008 00:38:00 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail5auth.barnet.com.au (Postfix) with ESMTP id 10D462218A77; Wed, 14 May 2008 00:38:00 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id A62B87C9; Wed, 14 May 2008 00:37:58 +1000 (EST) Date: Wed, 14 May 2008 00:37:58 +1000 From: Edwin Groothuis To: freebsd-net@freebsd.org Message-ID: <20080513143758.GA3041@k7.mavetju> References: <20080503100043.GA68835@k7.mavetju> <481F6AE1.5020408@elischer.org> <20080505231009.GX44028@k7.mavetju> <481F95DE.6090201@elischer.org> <4821330E.8030101@incunabulum.net> <4821535B.8050001@elischer.org> <48215D08.5050500@incunabulum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48215D08.5050500@incunabulum.net> User-Agent: Mutt/1.4.2.3i Cc: "Bruce M. Simpson" , Julian Elischer Subject: Re: IPPROTO_DIVERT and PF_INET6 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2008 14:38:02 -0000 On Wed, May 07, 2008 at 08:40:56AM +0100, Bruce M. Simpson wrote: > Julian Elischer wrote: > >actually the divert sockets should really not be in PF_INET > >they could deliver both inet and inet6 packets. > >the sockaddr that they return (and which needs to be read for divert > >to make sense) could be used to distinguish between them. > > Good point. I'd forgotten that they were abusing the fields in sin_zero. > This is not OK for IPv6, although the kludge can still be perpetuated by > looking at sa_len and stashing what divert wants at the end of sockaddr_in6. > > So there IS a case for making them a separate protocol family if > someone's going to do a clean implementation of divert sockets for IPv6. I have it more or less working! See my "FreeBSD IPv6 Divert socket adventures" at http://www.mavetju.org/weblog/html/00231.html (1) http://www.mavetju.org/weblog/html/00232.html (2) http://www.mavetju.org/weblog/html/00233.html (3) It contains links to patches for FreeBSD 6.3 and the nat6to4d.c. Please read the disclaimer in the second last paragraph of the 3rd article about the rough edges on it. I'm very keen on getting help from somebody to check it and to polish it up once I'm happy with it. For example with regarding to the "inpcb" things which I have absolutely no idea about what they are or what they do, or how to properly manage them. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/