Hi, all Before commit `f9deedf1`, BFD was implemented allowing only one instance of BFD protocol. The implementation was not prepared for multiple BFD protocol instances. In that commit, to support VRF, the check for multiple BFD instances was removed, which results in the possibility that multiple BFD protocol instances are configured for one VRF. `bfd_add_request()` will success only if given `bfd_proto` and `bfd_request` belong to the same VRF. So for each VRF, only the first BFD protocol instance will take effect.
This can be reproduced by the following configuration with the latest commit in branch legacy and similar configuration with the latest commit in branch master: ``` router id 192.168.0.1; protocol bfd bfd1{ interface "eth0" { interval 5s; idle tx interval 5s; }; }; protocol bfd bfd2{ interface "eth1" { interval 10s; idle tx interval 10s; }; }; protocol device { }; protocol static { route 2001:db8::/32 multipath via fe80::1%eth0 bfd via fe80::2%eth1 bfd ; }; ``` As shown in `show bfd session`, the configuration in instance `bfd2` is ignored: ``` # ./birdc -s bird6.ctl sh bfd sess bfd1 BIRD 1.6.8 ready. bfd1: IP address Interface State Since Interval Timeout fe80::2 eth1 Down 03:51:32 1.000 0.000 fe80::1 eth0 Down 03:51:32 5.000 0.000 # ./birdc -s bird6.ctl sh bfd sess bfd2 BIRD 1.6.8 ready. bfd2: IP address Interface State Since Interval Timeout ``` Expected behavior: I suggest such configuration be seen invalid and rejected when parsed. Cheers, Miao Wang