Deleting communities from outgoing prefixes

Ondrej Zajicek santiago at crfreenet.org
Tue Sep 14 12:26:04 CEST 2010


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 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: fix-signed-comparison.patch
Type: text/x-diff
Size: 1361 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100914/9592a746/attachment-0001.patch>


More information about the Bird-users mailing list