diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 4e237120a1..74ff6f4472 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -474,6 +474,7 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx, uint32_t min_tx, uint8_t detect_mult, int defaults) { + struct bfd_info *bi; struct peer_group *group; struct listnode *node, *nnode; int command = 0; @@ -481,6 +482,10 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx, bfd_set_param((struct bfd_info **)&(peer->bfd_info), min_rx, min_tx, detect_mult, defaults, &command); + /* This command overrides profile if it was previously applied. */ + bi = peer->bfd_info; + bi->profile[0] = 0; + if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { group = peer->group; for (ALL_LIST_ELEMENTS(group->peer, node, nnode, peer)) { @@ -489,6 +494,13 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx, min_rx, min_tx, detect_mult, defaults, &command); + /* + * This command overrides profile if it was previously + * applied. + */ + bi = peer->bfd_info; + bi->profile[0] = 0; + if ((peer->status == Established) && (command == ZEBRA_BFD_DEST_REGISTER)) bgp_bfd_register_peer(peer);