[patch] Unbreak setfib + routing daemons

Li, Qing qing.li at bluecoat.com
Mon Aug 31 17:26:37 UTC 2009


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 
a fib associated with them, which may need fixing.

-- Qing


> -----Original Message-----
> From: owner-freebsd-net at freebsd.org [mailto:owner-freebsd-
> net at freebsd.org] On Behalf Of Stef Walter
> Sent: Monday, August 31, 2009 10:03 AM
> To: freebsd-net at FreeBSD.org
> Subject: [patch] Unbreak setfib + routing daemons
> 
> Currently route messages are sent to all listeners of PF_ROUTE,
> regardless or which FIB the listener socket was started on.
> 
> 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.
> 
> 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...
> 
> 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.
> 
> FreeBSD PR:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/134931
> 
> 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.
> 
> Cheers,
> 
> Stef



More information about the freebsd-net mailing list