First, numbering the neighbor is weird considering everything else in BIRD is named. I would use regular symbols.
I chose to use numbers since it is easy to implement the PoC. Using symbols instead should be appropriate.
Yes, but it's kinda limited to only your expected use case.
Third, it may be more reasonable to create a regular table with the neighbor type (like what RAdv creates) and export the BFD neighbor state there. That would be way more versatile than labeling by numbers or names.
If I understand it correctly, the neighbor type you mentioned here is a kind of address family which can be processed in a routing table, to reflect the availability of a peer router. This has been used for BGP peers.
Exactly.
However, in this scenario, the mapping between the static route controlled and the bfd peer is arbitrarily specified by the user and thus I don't think exporting bfd neighbor status to to a neighbor table and importing them in the static protocol would fit this usage.
Easy. The mapping may, for example, say something like this: define deadbeef_present = count route 3fff::dead:beef from bfd42 table bfd_neighbors; protocol static { ipv6; route 3fff:67::/42 via 3fff:42::67 if deadbeef_present = 1; } This approach would be then viable to be used with way more things than just BFD peers, e.g. these would be regular conditional routes. There is a branch with this partially done, and while it may need significant reworks, it should be a good pointer into what we'd like to have inside future BIRD versions, feature-wise. I hope this helps. -- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.