asfilter/bgpmask

Ondrej Zajicek santiago at crfreenet.org
Sat Jun 12 12:39:25 CEST 2010


On Thu, Jun 10, 2010 at 08:21:02AM +0200, Arjan Filius wrote:
> Hello bird-users,
>
> i'm trying to make a bgp_out filter statement which allows only it's own  
> AS or multiple time's it's own AS.
>
> tried:
> define AS = YYY;
> if (  (bgp_path ~ [= AS =] || bgp_path ~ [= AS AS =] ) && net =  X.X.X.X/X ) then accept;
>
> which works fine, but if not very elegant/flexible
>
> Is there a better/more elegant way to do so?

Probably no. You can test just first and last item in bgp_path as valid
paths should not contain several instances of one ASN separated by a
different ASN, but this is not enforced.

-- 
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: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100612/d60a3314/attachment-0001.asc>


More information about the Bird-users mailing list