Yep, that was a copy/paste error (I tool the example from the web site) Actually I found a workaround for which I don't need an "else:" statement, and which is much better... ! Here was the faulty filter (of course replace example, XXX, prefix1 and prefix1 by valid info!) filter in_asset_ASexample { if is_nexthop_false() then reject; case bgp_path.last { example: if ! (net ~ [ pref1+, pref2+ ]) then bgp_community.add((myas,XXX)); else: bgp_community.add((myas,XXX)); } accept; } Script returns: bird: bird.conf.201012301556, line 169: syntax error line 169 is the line with the else statement... But if I reload the conf it seems to work... Thanks, Jerome Le 30/12/2010 21:13, Ondrej Zajicek a écrit :
On Thu, Dec 30, 2010 at 03:01:26PM +0100, Jerome Durand wrote:
Hi all,
I'm runnning bird6 version 1.2.5 and bird version 1.2.5 and I'm experiencing a problem:
Bird returns a syntax error at the "else:" line while bird6 tells me it's okay. Is this a well known bug or am I doing somethinig wrong? Do you see any workaround?
For me, it works as expected - with "else:" in IPv4 version. In your example (below) you are missing closing "}". But perhaps that is just a copy/paste error.
case arg1 { 2: print "two"; print "I can do more commands without {}"; 3 .. 5: print "three to five"; else: print "something else";
Note that I got the version via apt-get on Debian...
-- ------------------------------------------------------------- Jerome Durand Responsable des services aux usagers Services operations & support manager Réseau National de Télécommunications pour la Technologie, l'Enseignement et la Recherche Tel: +33 (0) 1 53 94 20 40 | GIP RENATER Fax: +33 (0) 1 53 94 20 41 | 23-25 rue Daviel E-mail: jdurand@renater.fr | 75013 PARIS http://www.renater.fr | FRANCE --------------------------------------------------------------