]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: notify BFD when adding new profile 7542/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Sun, 4 Oct 2020 21:04:27 +0000 (18:04 -0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 17 Nov 2020 18:07:59 +0000 (21:07 +0300)
When a BFD integrated session already exists setting the profile
doesn't cause a session update (or vice versa): fix this issue by
handling the other cases.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
lib/bfd.c

index d1a0ec671e505c3e7fbf0616774fb16e1320a337..758271b729168f356a7417740ed9b78a0c430fca 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -104,7 +104,10 @@ void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, uint32_t min_tx,
                if (((*bfd_info)->required_min_rx != min_rx)
                    || ((*bfd_info)->desired_min_tx != min_tx)
                    || ((*bfd_info)->detect_mult != detect_mult)
-                   || (profile && strcmp((*bfd_info)->profile, profile)))
+                   || ((*bfd_info)->profile[0] == 0 && profile)
+                   || ((*bfd_info)->profile[0] && profile == NULL)
+                   || (profile && (*bfd_info)->profile[0]
+                       && strcmp((*bfd_info)->profile, profile)))
                        *command = ZEBRA_BFD_DEST_UPDATE;
        }