Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2009 14:51:45 +0100
From:      Bruce Simpson <bms@incunabulum.net>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-net@FreeBSD.org, Stanislav A Svirid <s.svirid@sibset-team.ru>, "Bruce M. Simpson" <bms@FreeBSD.org>
Subject:   Re: kern/134931: [route] [fib] Route messages sent to all socket listeners regardless of setfib
Message-ID:  <4A1D4571.1050500@incunabulum.net>
In-Reply-To: <4A1CD68B.5070508@elischer.org>
References:  <200905270550.n4R5o2Lr034413@freefall.freebsd.org> <4A1CD68B.5070508@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A1D4571.1050500>