From owner-freebsd-net@FreeBSD.ORG Wed May 7 18:08:03 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 D81BE1065672 for ; Wed, 7 May 2008 18:08:03 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outJ.internet-mail-service.net (outj.internet-mail-service.net [216.240.47.233]) by mx1.freebsd.org (Postfix) with ESMTP id C4BCA8FC27 for ; Wed, 7 May 2008 18:08:03 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 07 May 2008 21:50:12 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id ED1AB2D6004; Wed, 7 May 2008 11:08:02 -0700 (PDT) Message-ID: <4821F001.10208@elischer.org> Date: Wed, 07 May 2008 11:08:01 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: "Bruce M. Simpson" 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> In-Reply-To: <48215D08.5050500@incunabulum.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Edwin Groothuis 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: Wed, 07 May 2008 18:08:03 -0000 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. "they" == "me" :-) if we made it its own protocol family we could define our own sockaddr types too and have actual fields for that stuff... > 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. > > cheers > BMS