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

Ondrej Zajicek santiago at crfreenet.org
Thu Mar 22 17:07:37 CET 2012


On Thu, Mar 22, 2012 at 02:42:06PM +0100, Benjamin Cama wrote:
> > 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?

On BSD, there are RTF_PROTO1,2,3 flags, so it is pretty natural
to return something like (RTF_PROTO1 + 2*RTF_PROTO2 + 4*RTF_PROTO3).

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20120322/b8749f79/attachment-0001.asc>


More information about the Bird-users mailing list