Deleting unallowed communities

Ondrej Zajicek santiago at crfreenet.org
Mon Sep 6 20:28:47 CEST 2010


On Mon, Sep 06, 2010 at 08:34:39PM +0300, Alexander Shikoff wrote:
> > c.delete(wrong);
> > 
> > I tried both c.delete(wrong) and delete(c,wrong) - the result is the same:
> > syntax error.
> 
> ok, I got it: c = delete(c,wrong); did make the error to dissapear.

Yes, either (for any clist c):

 c = delete(c,wrong);

or

 bgp_community.delete(wrong);

But the second form works only for bgp_community attribute.
 
'wrong' should be declared as pair set, not as clist.

> But there is another issue:
> 
> function check_community (clist c)
> pair set wrong;
> {
>         wrong = [
>                 (0,0)..(0,25371),
>                 (0,25373)..(0,31209),
>                 (0,31211)..(31209,65535),
>                 (31210,0)..(31210,25371),
>                 (31210,25373)..(31210,65535),
>                 (31211,0)..(65535,65281),
>                 (65535,65283)..(65535,65535)
>         ];
>         c = delete(c,wrong);
>         print c;
> }
> 
> bird reports in log file: 
> Sep  6 20:26:38 crete bird: filters, line 37: Can't add/delete non-pair

This code works for me.

This is a recent feature, perhaps you are using an old version of BIRD.
Try version 1.2.4 .

-- 
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: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100906/14f30916/attachment-0001.asc>


More information about the Bird-users mailing list