From a29c51a187caa09f26dd7df64ef24b02b11a79b5 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Sun, 4 Oct 2020 18:04:27 -0300 Subject: [PATCH] lib: notify BFD when adding new profile 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 --- lib/bfd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/bfd.c b/lib/bfd.c index 088bcc431b..1a37b348f8 100644 --- 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; }