From owner-freebsd-net@FreeBSD.ORG Wed May 7 07:41:00 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 271E81065671 for ; Wed, 7 May 2008 07:41:00 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id E71278FC0A for ; Wed, 7 May 2008 07:40:59 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 42FBBD8B9A; Wed, 7 May 2008 03:40:59 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 07 May 2008 03:40:59 -0400 X-Sasl-enc: PCIhEo071QonTiLvCFYXYxPdJ9OTznV1P+M2N2ieblYN 1210146058 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 7E96F1075C; Wed, 7 May 2008 03:40:58 -0400 (EDT) Message-ID: <48215D08.5050500@incunabulum.net> Date: Wed, 07 May 2008 08:40:56 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Julian Elischer 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> In-Reply-To: <4821535B.8050001@elischer.org> 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 07:41:00 -0000 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. cheers BMS