Constants can't contain other constants?

Michael Fincham michael at hotplate.co.nz
Thu Aug 21 07:12:04 CEST 2014


Hi everyone,

I'm presently investigating BIRD as a (much appreciated!) replacement for Quagga and running in to some behaviour that isn't clear from reading the documentation.

I'm looking at ways to consistently template BGP communities received from / sent to peers across multiple routers, and have attempted this:

define test_international = (test_asn, 90);
define test_national = (test_asn, 100);
define test_ix = (test_asn, 200);
define test_bilat = (test_asn, 300);
define test_customer = (test_asn, 400);
define test_infrastructure = (test_asn, 500);

define test_send_to_transit = [test_blackhole];
define test_send_to_ix = [];

define test_send_to_customer = [
    test_international,
    test_national,
    test_ix,
    test_bilat,
    test_customer,
    test_infrastructure
];

With a view to later making a call to 'filter' in the BGP export filter facing the test customer:

	bgp_community.filter(test_send_to_customer);

However loading this configuration in BIRD produces an error:

	bird> configure
	Reading configuration from /etc/bird/bird.conf
	/etc/bird/template/common.conf, line 84: Number expected

Line 84 being the line shown above "define test_send_to_transit = [test_blackhole];".

This suggests to me that one cannot define a constant including another existing constant in this manner? If so, is the best approach instead to define constants for individual communities and use re-usable 'functions' to group them logically?

Suggestions heartily appreciated :)

-- 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20140821/1c53d744/attachment.asc>


More information about the Bird-users mailing list