Or modify variant with krt_source: For enable announcing: ip route change to AAAA dev lo proto NNN For disable: ip route change to AAAA dev lo proto kernel
protocol kernel MAIN{ persist; scan time 20; learn; import where krt_source = NNN; export all; } where NNN some unused number in /etc/iproute2/rt_protos If you don't want to use birdc configure every time. 02.06.2017, 16:54, "Jan Matejka" <jan.mate...@nic.cz>: > On 06/02/2017 12:59 PM, Войнович Андрей Александрович wrote: >> Hi all! >> >> Does BIRD allow to write a filter, where I can define a condition when it >> should import/export some route(s) and when it should not? To clarify my >> question, example: I want to check whether some process (lets say apache) is >> running and the server is listening TCP port 80, so if these conditions are >> true, BIRD should export some route to OSPF, if false – should not. > > No, this is not possible in a simple way. > > Anyway, you may use a set of config files like this: > > bird.conf: > ... > include "apache-check.conf"; > ... > > apache-check-yes.conf: > static apachecheck { route XYZ }; > > apache-check-no.conf: empty > > apache-check.conf: symlink to apache-check-no.conf > > write a script like this: > > * if the condition is true: ln -sf apache-check-yes.conf apache-check.conf > * else: ln -sf apache-check-no.conf apache-check.conf > * if the script changed the symlink, reload bird config > > and run the script by cron every other while. > > Hope this is clear enough to help you. > MQ