[PATCH] Allow to match on the kernel route protocol in filters

Benjamin Cama benoar at dolka.fr
Thu Mar 22 14:42:06 CET 2012


Le jeudi 22 mars 2012 à 13:14 +0100, Ondrej Zajicek a écrit :
> On Thu, Mar 22, 2012 at 12:26:00PM +0100, Benjamin Cama wrote:
> > We debated offline whether we should include both or not, but I didn't
> > realize that KRT_SRC_BIRD and KRT_SRC_REDIRECT where filtered out before
> > reaching bird tables. Anyway, we tried to find a good compromise between
> > having only one source of authority (thus unifying both attributes) but
> > still being able to use this attribute for system not aware of krt_proto
> > (i.e. non-Linux). I didn't find a satisfying answer to that. Now that we
> > reduced the possibilities, could the possibility to filter on krt_proto
> > = ipp_kernel (or !=) be left for BSD users? E.g. by setting krt_proto to
> > the same netlink value as Linux when krt_src == KRT_SRC_KERNEL?
> 
> I guess a good solution would be to fill some relevant krt_proto on BSD
> (probably the value of RTF_PROTO* flags). One minor downside is that
> kernel route value would be system-dependend (0 on BSD, ipp_kernel (i.e. 2)
> on Linux). But that is probably OK, ipp_kernel constant is not even
> defined on BSD.

Why not make krt.proto = 2 on BSD too when krt.src == KRT_SRC_KERNEL?
And define *just* ipp_kernel symbol to be 2 on this platform? Seems too
hackish?

--
Benjamin




More information about the Bird-users mailing list