On Tue, Jul 14, 2015 at 01:29:35PM +0200, Peter Hudec wrote: > Hi, > > > If I remember correctly, I tried this as well. And again, if my memory > > serves me well, you cannot use a defined constant with the "router > > id"-directive. (Don't know the reason.) > thanks, I put the just value.
Hi Well, it is actually a bug, should work even there. There is one more problematic issue related to defines - it shares namespace with keywords and other symbols in config grammars, trying to define name colliding with e.g. a protocol option would cause a syntax error message for that define. > Any way I have antother snippet ;( > > --- > define anycast_bgp_as = 57801; > define anycast_a_bgp_community = 11; > define anycast_a_bgp_med = 100; > > .... > filter bgp_out_anycast { > > if (match_anycast_a()) then { > bgp_community.add((anycast_bgp_as,anycast_a_bgp_community)); > if (anycast_a_bgp_med > 0) { > bgp_med = anycast_a_bgp_med; > } > accept; > } > .... > --- > > The problem is in IF statement. Because of missing 'then' in the inner if-statement. BTW, you don't need outer parentheses in if-statements (e.g. "if a > 0 then { }" is correct). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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."
signature.asc
Description: Digital signature