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

Ondrej Zajicek santiago at crfreenet.org
Mon Mar 19 13:26:41 CET 2012


On Wed, Mar 14, 2012 at 08:50:24PM +0100, Jérémie Dimino wrote:
> Hi,
> 
> I made a patch that allow to access the protocol field of routes
> learned from the kernel. The goal is to be able to filter on the
> protocol that added the route. For example FDN [1] need it to filter
> routes added by a patched version of l2tpns [2].
> 
> The patch adds two attributes: krt_source and krt_proto. krt_source
> is an enum which export the u.krt.src field of routes and krt_proto is
> an integer which export the u.krt.proto field. The patch also adds
> constants from /etc/iproute2/rt_protos.

Thanks, i will merge but there are some minor issues with this.

First, i will remove krt_source, that seems useless - you will never get
KRT_SRC_BIRD and KRT_SRC_REDIRECT, so you get only KRT_SRC_ALIEN
or KRT_SRC_KERNEL, which is the same as whether krt_proto is ipp_kernel.

Second, the attribute is not shown in 'show route all', i will fix that.

-- 
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/20120319/652e062c/attachment-0001.asc>


More information about the Bird-users mailing list