Aw: define command is not working ?
Ondrej Zajicek
santiago at crfreenet.org
Fri Jul 17 23:05:15 CEST 2015
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: 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: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150717/fd8528f5/attachment.asc>
More information about the Bird-users
mailing list