Re: constant not available everywhere and passing variables from protocols

2018-03-21 Thread Jan Maria Matejka
> Are there considerations in future to pass bgp_neighbour object to > filter, to discriminate on neighbor address, ifname, asn, etc? JunOS > allows this. This would allow me to keep single 'define backup_int = > "XYZ". On ingress I'd match against protocol, on egress I'd match > against bgp_neighb

Re: constant not available everywhere and passing variables from protocols

2018-03-21 Thread Saku Ytti
On 21 March 2018 at 12:13, Jan Maria Matejka wrote: >> Why not? It barfs with 'line 10: IP address expected' > > In v1.6.x, nobody implemented it. In v2, it should work. Thanks, will consider upgrading. > Try 'import where yourCustomImportFunction(arg1, arg2, arg3, ... argN)'. Thanks. Are th

Re: constant not available everywhere and passing variables from protocols

2018-03-21 Thread Jan Maria Matejka
On 03/21/2018 10:00 AM, Saku Ytti wrote: > My config: > > define local_ip = 129.250.14.127; > define default_candidate_net = 129.250.0.0/16; > define default_candidate_ip = 129.250.0.0; > define default_net = 0.0.0.0/0; > include "common.conf"; > > protocol static { > ro

constant not available everywhere and passing variables from protocols

2018-03-21 Thread Saku Ytti
My config: define local_ip = 129.250.14.127; define default_candidate_net = 129.250.0.0/16; define default_candidate_ip = 129.250.0.0; define default_net = 0.0.0.0/0; include "common.conf"; protocol static { route 0.0.0.0/0 recursive default_candidate_ip; } # ens192 pro