BFD neighbor reload issue
Hi, I am using BFD neighbor to config BFD sessions statically. I found that if I add/remove BFD neighbors in bird.conf and ask bird to reload with HUP signal, bird cannot reload the configuration correctly. Here is the BFD config I used to test. If I start bird with this configuration, then comment one of the neighbors and send HUP with kill to bird, bird simply says session reconfigured without remove the commented neighbor. protocol bfd { interface "*" { passive; }; neighbor 172.17.0.2; neighbor 172.17.0.3; } After digging into the code, I found that it looks like there is a bug in function bfd_reconfigure_neighbors. It loops to check neighbor in old and new configuration. There is a return in the block if (bfd_same_neighbor(nn, on)). If there is neighbor existing in both new and old, reconfiguration might be skipped. I tried to modify the code to make it work. And the attached patch is the one I got. Hopefully this is the proper way to solve the issue. Regards. Chen.
On Mon, Sep 30, 2019 at 11:15:45PM +0800, Winston Chen wrote:
Hi,
I am using BFD neighbor to config BFD sessions statically. I found that if I add/remove BFD neighbors in bird.conf and ask bird to reload with HUP signal, bird cannot reload the configuration correctly. ... After digging into the code, I found that it looks like there is a bug in function bfd_reconfigure_neighbors. It loops to check neighbor in old and new configuration. There is a return in the block if (bfd_same_neighbor(nn, on)). If there is neighbor existing in both new and old, reconfiguration might be skipped.
Hi Thanks. You are right, the return should just continue in the outer loop. Your patch seems OK, i just used a simpler fix (attached). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
Winston Chen