On September 18, 2019 7:46:15 AM GMT+02:00, Nico Schottelius <nico.schottelius@ungleich.ch> wrote:
Hello,
being a bird 1.6 user (Debian), I find myself often in the situation that I'd like to define a variable in either bird.conf or bird6.conf and have a general.conf that defines the filters used in both protocols.
However if I have a variable, for instance net_prefer_provider_a = [ s.o.m.e/prefix+ ]; in bird6.conf, but not don't prefer IPv4 traffic from any network of this provider, I'd like to define
net_prefer_provider_a = [];
However this is not supported in bird1.6. Now I tried to get around this problem by using defined(), however this code also does not work:
if defined(net_prefer_to_a) then { if net ~ net_prefer_to_a then { bgp_local_pref = pref_high; } }
You should declare net_prefer_to_a as a variable. And if you don't initialize it, then defined(...) is false.
net_prefer_to_a is defined in IPv6, but not in IPv4.
This gives the error message:
/etc/bird/general.conf:128:40 net_prefer_to_a: variable expected.
This means that the lexer doesn't know the symbol at all. Maria -- Sent from my Android device with K-9 Mail. Please excuse my brevity.