On Thu, Jul 02, 2015 at 01:37:48PM +0100, Dominik Bay wrote: > Hi, > > I'm working on a Enterprise-network merger where I have to temporarily > workaround an AS-Path issue and need to clean the path. > > I want to use the Filter language for that, > http://bird.network.cz/?get_doc&f=bird-5.html > > I want to apply this function: > > filter bgp_cut_path () > { > if p.first == 65500 && p.last != 65500 { delete(P, 65500) } then return; > } > > which doesn't touch the first two, but removes 65500 from the third. > > Is this possible? Am I on the right way? :-)
Hi It is possible. This should work: if (bgp_path.first = 65500) and (bgp_path.last != 65500) then bgp_path.delete(65500); Note that if conditions apply, it will delete all instances of 65500 from the path. See documentation on bgppath: http://bird.network.cz/?get_doc&f=bird-5.html#ss5.2 -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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."
signature.asc
Description: Digital signature