From owner-freebsd-net@FreeBSD.ORG Wed May 27 13:51:50 2009 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 857F61065689; Wed, 27 May 2009 13:51:50 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 57BF38FC18; Wed, 27 May 2009 13:51:50 +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 68D4434689D; Wed, 27 May 2009 09:51:49 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 27 May 2009 09:51:49 -0400 X-Sasl-enc: 4/gcoVmsc0VVWn8FnPFSCa3kc7W6Dw/z4+nBOg2m5w6J 1243432309 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 A51C712648; Wed, 27 May 2009 09:51:48 -0400 (EDT) Message-ID: <4A1D4571.1050500@incunabulum.net> Date: Wed, 27 May 2009 14:51:45 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Julian Elischer References: <200905270550.n4R5o2Lr034413@freefall.freebsd.org> <4A1CD68B.5070508@elischer.org> In-Reply-To: <4A1CD68B.5070508@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@FreeBSD.org, Stanislav A Svirid , "Bruce M. Simpson" Subject: Re: kern/134931: [route] [fib] Route messages sent to all socket listeners regardless of setfib 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, 27 May 2009 13:51:50 -0000 Julian Elischer wrote: > Stanislav A Svirid wrote: >> >> So, how routing daemon can decide in what FIB route is changed? >> Or it can't now? > > I believe there is a field that has been used for this purpose in > OpenBSD, but is otherwise deprecated. anyone woth ore knowledge of > teh protocls is invited to let us know what was used. > > Alternatively I was considering filtering packets to a routing > socket to only allow packets relevant to that fib to be sent up. > but I don't know much about the routing socket protcol. Some of PF_ROUTE is pretty obscure. Netmasks, for example, are not encoded in a particularly intuitive or well documented way. It is a somewhat tightly packed encoding. Some would argue we shouldn't go the way Linux did -- i.e. implement a full-blown TLV protocol, some would argue it's the way to deal with situations like this. One thing that stands out about PF_ROUTE is that it is treated as a broadcast domain for all raw PF_ROUTE sockets. If those general semantics need to be changed then the implications of that change need to be considered very carefully. I'm not sure if the submitter is proposing that we change that -- it could break a lot of applications which depend on the routing socket, but clearly another field would be needed to indicate which FIB a route socket message relates to. A kludge/workaround which avoids reimplementing the PF_ROUTE layer would be to add a socket option and flag to the pcb for PF_ROUTE which indicates if the consumer is FIB aware, and default to off.