On Thu, Jul 03, 2014 at 01:41:33PM +0300, Alexander Shikov wrote:
> Hi!
>
> On Thu, Jul 03, 2014 at 12:48:04PM +0200, Ondrej Zajicek wrote:
> > This is expected, as .add argument may be a (e)clist, but not a (E)C set,
> > and [ (ro,MyASN,10856), (ro,MyASN,3) ] expression is an EC set.
> Hm... Now I'm confused.
> "clist is similar to a set"
> I understand that as I can define eclist variable in a similar way:
> eclist var;
> var = [ ... ];
>
> I tried that:
> filter Reject_Static
> eclist cmn;
> {
> cmn = [ (ro,MyASN,10856), (ro,MyASN,3) ];This is the same problem - assigning EC set value to eclist variable. > "print cmn.len" does not print anything neither in syslog nor in stderr, > when running with -d switch. Seems like you have missing all log messages from filters. What your 'log' config option looks like? > >From my point of view, expressions like > bgp_community.add( [] ) > bgp_ext_community.add( [] ) > should treat arguments like (e)clist. It would be more logical. Unfortunately with the way how the filter language is implemented, expressions are interpreted independently of the context and the '[...]' expression is just a set expression. > > But it should report error during filter: > > bird: filters, line 169: Can't add set > > It does not reports anything. Moreover, if change [] brackets with () > brackets: > cmn = ( (ro,MyASN,10856), (ro,MyASN,2) ); > ... there is no syntax error, but it should be? You can enclose any expression with () brackets, it does not change its meaning, . It is like 2+2 vs (2+2). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: [email protected]) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
signature.asc
Description: Digital signature
