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@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."