Date: Mon, 31 Aug 2009 17:20:08 GMT From: Stef Walter <stef-list@memberwebs.com> To: freebsd-net@FreeBSD.org Subject: Re: kern/134931:[route] [fib] Route messages sent to all socket listeners regardless of setfib Message-ID: <200908311720.n7VHK8El047213@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/134931; it has been noted by GNATS.
From: Stef Walter <stef-list@memberwebs.com>
To: bug-followup@FreeBSD.org, count@211.ru
Cc:
Subject: Re: kern/134931:[route] [fib] Route messages sent to all socket listeners
regardless of setfib
Date: Mon, 31 Aug 09 17:20:06 UTC
This is a multi-part message in MIME format.
--------------030509050508050401080102
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
As it currently stands, using routing daemons + multiple fibs in FreeBSD
7.x and 8.x is pretty much broken. Here's a patch which fixes the problem.
I agree in principle with Mark that having future route messages might
be able to let routing daemons differentiate between various fibs and
manage them, and that this might be a feature.... However any
implementation of that would likely break API and ABI, and very probably
exist purely in FreeBSD 9.x.
All the best,
Stef
--------------030509050508050401080102
Content-Type: text/x-diff;
name="freebsd-route-messages-respect-fib.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="freebsd-route-messages-respect-fib.patch"
--- sys/net/rtsock.c.orig 2009-08-31 15:26:03.000000000 +0000
+++ sys/net/rtsock.c 2009-08-31 16:07:06.000000000 +0000
@@ -777,4 +777,5 @@
}
if (m) {
+ M_SETFIB(m, so->so_fibnum);
if (rp) {
/*
--- sys/net/raw_usrreq.c.orig 2009-08-31 16:04:58.000000000 +0000
+++ sys/net/raw_usrreq.c 2009-08-31 16:05:11.000000000 +0000
@@ -84,4 +84,7 @@
rp->rcb_proto.sp_protocol != proto->sp_protocol)
continue;
+ if (proto->sp_family == PF_ROUTE && rp->rcb_socket &&
+ M_GETFIB (m) != rp->rcb_socket->so_fibnum)
+ continue;
if (last) {
struct mbuf *n;
--------------030509050508050401080102--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908311720.n7VHK8El047213>
