]> git.puffer.fish Git - matthieu/frr.git/commit
bfd: Fix for missing BFD client regs/deregs from quagga clients
authorradhika <radhika@cumulusnetworks.com>
Tue, 21 Jun 2016 10:39:58 +0000 (03:39 -0700)
committerradhika <radhika@cumulusnetworks.com>
Tue, 21 Jun 2016 10:39:58 +0000 (03:39 -0700)
commit2376c3f225ee601e2e025e1813006ab79c3fd0a6
tree6bab931635afa55ebeacc2e716e1055409d301b8
parent6776485deef32900c119a61d43faecb515d3b20b
bfd: Fix for missing BFD client regs/deregs from quagga clients

Ticket: CM-11256
Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>
Testing: Unit, PTM smoke, OSPF smoke, BGP Smoke

Issue:
BFD client registrations are not being sent to PTM from BGP/OSPF clients when the quagga clients have no BFD configuration. This can create stale BFD sessions in PTM when BFD is removed from quagga configuration before quagga is restarted.

BFD client de-registrations from BGP/OSPF also go missing sometimes when quagga is restarted. This also will cause stale BFD sessions in PTM.

Root Cause:
BFD client registrations were being sent at the time of BGP/OSPF daemon initialization. But, they were being sent to zebra before the socket connection between zebra and BGP/OSPF was established. This causes the missing BFD client registrations.

BFD client de-registrations are sent from zebra when zebra detects socket close for BGP/OSPF daemons. Based on the timing, the de-registrations may happen after socket between PTM and zebra is closed. This will result in missing de-registrations.

Fix:
Moved sending of BFD client registration messages to zebra connected callback to make sure that they are sent after the BGP/OSPF daemons connect with zebra.

Added BFD client de-registrations for BGP/OSPF to be also sent when zebra daemon gets restart signal. They are sent from the signal handler only if it was not already handled in zebra client socket close callback.
bgpd/bgp_bfd.c
bgpd/bgp_zebra.c
ospf6d/ospf6_bfd.c
ospf6d/ospf6_zebra.c
ospfd/ospf_bfd.c
ospfd/ospf_zebra.c
zebra/zebra_ptm.c
zebra/zebra_ptm.h
zebra/zserv.c