summaryrefslogtreecommitdiffstats
path: root/staticd/static_routes.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2021-03-24 13:39:55 +0100
committerRafael Zalamena <rzalamena@opensourcerouting.org>2023-01-13 19:32:12 +0100
commit351ad684058412e4ac187692913a4ce150088d3f (patch)
tree1c779e8507739f617749a5d240cae5e79d71df09 /staticd/static_routes.c
parentyang: static route BFD monitoring (diff)
downloadfrr-351ad684058412e4ac187692913a4ce150088d3f.tar.xz
frr-351ad684058412e4ac187692913a4ce150088d3f.zip
staticd: BFD integration northbound support
Implement all BFD integration northbound callbacks and integrate BFD with `staticd` route installation procedure. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'staticd/static_routes.c')
-rw-r--r--staticd/static_routes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/staticd/static_routes.c b/staticd/static_routes.c
index ed4cdc51c..3595cc564 100644
--- a/staticd/static_routes.c
+++ b/staticd/static_routes.c
@@ -276,6 +276,8 @@ struct static_nexthop *static_add_nexthop(struct static_path *pn,
/* Make new static route structure. */
nh = XCALLOC(MTYPE_STATIC_NEXTHOP, sizeof(struct static_nexthop));
+ /* Copy back pointers. */
+ nh->rn = rn;
nh->pn = pn;
nh->type = type;
@@ -393,6 +395,8 @@ void static_delete_nexthop(struct static_nexthop *nh)
struct route_node *rn = pn->rn;
static_nexthop_list_del(&(pn->nexthop_list), nh);
+ /* Remove BFD session/configuration if any. */
+ bfd_sess_free(&nh->bsp);
if (nh->nh_vrf_id == VRF_UNKNOWN)
goto EXIT;