[technique] [Fwd: Re: [PATCH] Allow to match on the kernel route protocol in filters]

Laurent GUERBY laurent at guerby.net
Lun 19 Mar 14:22:39 CET 2012


Merci Jérémie :). Implémenté sur une idée de Benjamin
Cama de FDN.

http://marc.info/?t=133175481200004&r=1&w=2

Sincèrement,

Laurent

-------- Forwarded Message --------
From: Ondrej Zajicek <santiago at crfreenet.org>
To: Jérémie Dimino <jeremie at dimino.org>
Cc: bird-users at trubka.network.cz
Subject: Re: [PATCH] Allow to match on the kernel route protocol in
filters
Date: Mon, 19 Mar 2012 13:26:41 +0100

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





Plus d'informations sur la liste de diffusion technique