need some help with filters

Ondrej Zajicek santiago at crfreenet.org
Sat Dec 5 15:51:27 CET 2015


On Fri, Dec 04, 2015 at 11:15:16PM +0100, D.Wesołowski wrote:
> Hi,
> 
...
> 
> the last two line don't works.
> I'm looking for some hint to make it work as I want ;)

You mean this ones?

>   return (bgp_path.first ~ [ 51931, 51944 ]);
>   #if bgp_path.first ~ [ 51931, 51944 ] then return true;


I guess the problem is that export filters are executed not before BGP
internal processing (including AS PATH update), but after that.
Therefore, on EBGP session your ASN is prepened and is the first, ASN
from whom you received the prefix is the second.

This is confusing and a bit silly, but that is how it currently works.
I would like to change the order in the future (to first apply filters
and then internal protocol processing).

You could do either matching based on the source protocol name
(proto = "ARPNET"), ASN membership (51931 ~ bgp_path) or
AS path pattern matching (bgp_path ~ [= 199943 51931 * =]).


-- 
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: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20151205/4a3ef193/attachment.asc>


More information about the Bird-users mailing list