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 <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2020-10-04 18:04:27 -03:00
parent 270f9c682c
commit a29c51a187

View File

@ -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;
}