summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_bfd.c3
-rw-r--r--bgpd/bgp_bfd.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 7656ad59ec..f1bdcc8bb4 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -310,7 +310,6 @@ void bgp_peer_configure_bfd(struct peer *p, bool manual)
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)
@@ -448,6 +447,8 @@ DEFUN (neighbor_bfd,
else
bgp_peer_configure_bfd(peer, true);
+ bgp_peer_config_apply(peer, peer->group);
+
return CMD_SUCCESS;
}
diff --git a/bgpd/bgp_bfd.h b/bgpd/bgp_bfd.h
index ec2772b69b..9dca48a437 100644
--- a/bgpd/bgp_bfd.h
+++ b/bgpd/bgp_bfd.h
@@ -60,6 +60,9 @@ extern void bgp_peer_config_apply(struct peer *p, struct peer_group *pg);
/**
* 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);