On Fri, Feb 13, 2009 at 08:55:01PM +0100, Harald Michl wrote:
Hi!
I've two questions regarding filtering of bgp announcements. One simple and one more complicated :-)
The simple one:
I do not want to announce prefixes that have the community 0:64003 attached, but all other prefixes. What I did is:
export filter { if (0,64003) ~ bgp_community then { reject; } accept; };
The peer receives no prefixes at all. Any hints?
This seems to be correct, so perhaps there is a bug in Bird. You can add some print statements and examine log wheter bgp_community contains what you expect it should contain.
The other question is more interesting/complicated. Is it possible to include some kind of macros in outbound filters? What I would like would be: ... Does that feature exist? If not, would somebody else need something?
You can have named filters (but without parameters) See test_filter in doc/bird.conf.example . You can also define functions and use them in filters. See also http://bird.network.cz/?get_doc&f=bird-5.html . -- 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."