Use Variables / Defines in include statements

Tim Weippert weiti at weiti.org
Tue Jan 17 13:37:29 CET 2017


Hi Jan, 

On Tue, Jan 17, 2017 at 01:00:57PM +0100, Jan Matejka wrote:
> On 01/17/2017 11:03 AM, Tim Weippert wrote:

[ ... ] 

> I assume you call this function from a filter. It would mean to resolve
> the filename for every route import/export. This is virtually impossible
> in the current architecture of filters; in the far future when another
> filter language is involved, it may be possible but still slow (all the
> config reading and parsing must be involved together with several syscalls).

Ok, good to know, that ot is currently not possible and maybe in future.
So, i hadn't overseen something ..

> It should be possible to use the case switch to explicitely include
> these files, one by one. It is also needed to reload the config on every
> change.
> 
> case asn {
> 	65500: include "/etc/bird/65500-special.conf";
> 	65511: include "/etc/bird/65511-special.conf";
> 	...
> }

Yes, that's my plan C. Currently i use If clauses and that seems to work
fine.

regards, 
tim

-- 
Tim Weippert
http://weiti.org - weiti at weiti.org
GPG Fingerprint - E704 7303 6FF0 8393 ADB1  398E 67F2 94AE 5995 7DD8


More information about the Bird-users mailing list