Move `bgp_peer_config_apply` outside `bgp_peer_configure_bfd` (and
document it) so we only call the session installation once with one
set of timers. It also makes all calls of that function
equal (e.g. always calls `bgp_peer_config_apply` afterwards).
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
p->nexthop.ifp->name);
bfd_sess_enable(p->bfd_config->session, true);
- bgp_peer_config_apply(p, p->group);
}
static void bgp_peer_remove_bfd(struct peer *p)
else
bgp_peer_configure_bfd(peer, true);
+ bgp_peer_config_apply(peer, peer->group);
+
return CMD_SUCCESS;
}
/**
* Allocates and configure BFD session for peer. If it is already configured,
* then it does nothing.
+ *
+ * Always call `bgp_peer_config_apply` afterwards if you need the changes
+ * immediately applied.
*/
extern void bgp_peer_configure_bfd(struct peer *p, bool manual);