Deleting communities from outgoing prefixes

Alexander Shikoff minotaur at crete.org.ua
Mon Sep 13 20:56:07 CEST 2010


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.

Why is it impossible to delete them?
Thanks in advance!

-- 
MINO-RIPE



More information about the Bird-users mailing list