From owner-freebsd-net@FreeBSD.ORG Mon Aug 31 17:26:37 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 41D5B106566B for ; Mon, 31 Aug 2009 17:26:37 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 29FD78FC19 for ; Mon, 31 Aug 2009 17:26:37 +0000 (UTC) Received: from bcs-mail03.internal.cacheflow.com ([10.2.2.95]) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id n7VHQa97026668; Mon, 31 Aug 2009 10:26:36 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 31 Aug 2009 10:26:25 -0700 Message-ID: In-Reply-To: <200908311702.n7VH2iHI022732@whisker.bluecoat.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [patch] Unbreak setfib + routing daemons Thread-Index: AcoqXN6bsmxAS2rpQVWl5P4YOT/BuQAAwFPA References: <200908311702.n7VH2iHI022732@whisker.bluecoat.com> From: "Li, Qing" To: , "freebsd-net@FreeBSD.org" Cc: Subject: RE: [patch] Unbreak setfib + routing daemons 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: Mon, 31 Aug 2009 17:26:37 -0000 Hi Stef, I am not sure if this patch is complete. There are other commands through the routing socket that can trigger routing messages. For example, issuing "ifconfig" to add and remove interface addresses. At the moment these types of routing messages do not have=20 a fib associated with them, which may need fixing. -- Qing > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > net@freebsd.org] On Behalf Of Stef Walter > Sent: Monday, August 31, 2009 10:03 AM > To: freebsd-net@FreeBSD.org > Subject: [patch] Unbreak setfib + routing daemons >=20 > Currently route messages are sent to all listeners of PF_ROUTE, > regardless or which FIB the listener socket was started on. >=20 > The upshot of this is that one can't really use routing daemons > together > with multiple FIBs. The routing daemon sees the messages from the > alternate FIBs and rapidly gets confused. >=20 > In the future, someone might decide to expose FIB numbers in the route > messages themselves. This could allow routing daemons to filter them > out. Such a solution might be appropriate for FreeBSD 9.x and later, as > it would likely break API and ABI. In any case, I'm not really > qualified > to argue the merits/problems of such an approach, and coding it is > beyond my abilities... >=20 > Attached is a patch which fixes this problem in a simple way. It limits > route messages to listening PF_ROUTE sockets on the same FIB that the > route message was for. It compiles and works on 7.1+ and 8.0 and > CURRENT. >=20 > FreeBSD PR: >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/134931 >=20 > How can I help this get into FreeBSD? It would be awesome if this fix > or > one like it made it in before the 8.0 release. >=20 > Cheers, >=20 > Stef