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)? -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@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."