BIRD export reject not working

Ondrej Zajicek santiago at crfreenet.org
Tue Sep 19 12:31:38 CEST 2017


On Tue, Sep 19, 2017 at 11:27:58AM +0200, Tim Weippert wrote:
> Hi, 
> 
> IIRC, bird added your local ASN before export filter, so 64515 is
> neither first nor last in ASN Path, and it isn't exactly only 64515 in
> the path.

Hi, you are right, but note that 'if bgp_path = 64515 then reject;' does
not check whether it is exactly only 64515 in the path, it is just type
error (and it is probably reported, but to logs, not to birdc shell).

But i wonder why it is shown in such case, as any error during filter
execution is generally handled as reject.

> I suggest to use something like:
> 
> if bgp_path ~ [= * 64515 * =] then reject;

This should work, but simpler way is this:

if 64515 ~ bgp_path then reject;

> 
> This should reject any bgp_path contains AS 64515.

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


More information about the Bird-users mailing list