bird 1.3.2 - kernel / learn / filters
Ondrej Zajicek
santiago at crfreenet.org
Wed Aug 17 23:22:57 CEST 2011
On Wed, Aug 17, 2011 at 09:39:03PM +0100, Alex Bligh wrote:
>
>
> --On 17 August 2011 22:50:06 +0200 Ondrej Zajicek
> <santiago at crfreenet.org> wrote:
>
>>> Using the device protocol, I can mask out all the interfaces
>>> bar these autogenerated ones because I give them a name with a
>>> constant prefix.
>>
>> Perhaps the direct protocol (to filter generated device routes)?
>
> Sorry, I meant the direct protocol. I didn't even realise you
> could export from the device protocol.
It is not a real route export, just some specific option to filter
interfaces. But it is probably better to forget about this option
:-)
> However, this doesn't pick up situations where the interface
> itself is unnumbered, with just a static route pointing out of
> it (for /32 numbering), which is my issue. The static route
> is inserted by a separate call to "ip route" (by me), and
> looks like this:
> ip route add 4.4.4.4/32 proto SOMEPROTO nexthop dev evrr-000001
>
> Even though it has a "dev" next-hop, it isn't a device route
> in bird terms, and only the kernel (bird) protocol sees it, as far as
> I can tell.
In my terms it is a device route, but it is not a route related to iface
address prefix (so it is not a route generated by 'direct' protocol)
prefix.
BTW, you can add this as an interface address using something like:
ip a a SOME_LOCAL_ADDR peer 4.4.4.4/32 dev evrr-000001
(where SOME_LOCAL_ADDR can be shared for all such ifaces)
BTW2, For now, your requirement to filter out routes based on protocol
could be easily done by modifying the source, there is already similar
hack in BIRD code (see [*]), if you modify it (see attached patch), it
will be applied on all routes and blocks import of routes with RTPROT_BOOT.
[*] http://www.mail-archive.com/bird-users@atrey.karlin.mff.cuni.cz/msg01039.html
--
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: proto.patch
Type: text/x-diff
Size: 661 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20110817/d50483be/attachment-0001.patch>
More information about the Bird-users
mailing list