On Tue, Sep 14, 2010 at 12:26:04PM +0200, Ondrej Zajicek wrote: > On Mon, Sep 13, 2010 at 09:56:07PM +0300, Alexander Shikoff wrote: > > Hello, > > > > I want to store prefixes in RIB with communities but I want to delete > > communities when prefix is being announced to peer. > > I'm trying following function: > > > > function bgp_out (int peer_as) > > { > > if ! (source = RTS_BGP ) then return false; > > if (0,MyASN) ~ bgp_community then return false; > > if (0,peer_as) ~ bgp_community then return false; > > > > if ( (MyASN,MyASN) ~ bgp_community ) || > > ( (MyASN,peer_as) ~ bgp_community ) then { > > bgp_community.delete([ (0,0)..(65535,65535) ]); > > print bgp_community; > > return true; > > } > > return false; > > } > > > > But communities are not deleted, I see them in debug output. > > bgp_community.add works as expected. > > This is a bug in the set code, could you try the attached patch > (together with the one i sent previously for another issue)?
Thank you very much! It works perfectly. -- MINO-RIPE