Problem with clist
Mihai Claudiu Capatina
mihai at vector-communications.net
Wed Jun 15 15:09:13 CEST 2011
Hi,
We are trying to filter unwanted communities that our peering partners have forgot to remove in order not to send them to other peering parties.
In order to do this we add the communities we want to a clist parameter, empty bgp_community, then add the clist back to bgp_community.
The configuration is like this :
function check_allow_communities()
clist myc;
{
if ( (100,101) ~ bgp_community ) then { myc = add(myc, (100,101)); }
if ( (100,102) ~ bgp_community ) then { myc = add(myc, (100,102)); }
return myc;
}
function check_deny_communities()
clist myc;
{
if ( (0,101) ~ bgp_community ) then { myc = add(myc, (0,101)); }
if ( (0,102) ~ bgp_community ) then { myc = add(myc, (0,102)); }
return myc;
}
filter bgp_in_100
pair set allow_communities;
pair set deny_communities;
{
if ( is_martian() ) then {
reject "Prefix filtered out by is_martian";
}
else {
allow_communities = check_allow_communities();
deny_communities = check_deny_communities();
bgp_community.empty;
bgp_community.add((100,1000));
bgp_community.add((100,3000));
bgp_community.add(allow_communities);
bgp_community.add(deny_communities);
accept;
}
}
The problem appears in the log fie :
Jun 15 15:59:59 jls bird: filters, line 21: Can't add/delete to non-clist
Jun 15 15:59:59 jls last message repeated 4 times
Jun 15 15:59:59 jls bird: ...
We are running BIRD 1.3.1 on FreeBSD 6.2.
Can you please point me in the right direction ?
Best Regards,
Mihai Claudiu Capatina
Managing Partner
Vector Communications SRL
Address : Aleea Cetatuia, Nr. 4, Bl. M22, Sc. 5,
Et. 2, Ap. 276, Sect. 6, Bucuresti, 060834
Romania
Phone: +40-729-087003
Fax: +40-318-146297
www.vector-communications.net
More information about the Bird-users
mailing list