summaryrefslogtreecommitdiffstats
path: root/staticd
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-06-27 17:34:50 +0200
committerGitHub <noreply@github.com>2023-06-27 17:34:50 +0200
commit579d00e167bedfd9770cf5c1b692fa0d56f8196c (patch)
tree334f0c5ac83ebd2b362ee7b2abfdbb929f686dbe /staticd
parentMerge pull request #13826 from opensourcerouting/fix/ripng_match_ipv6_acls (diff)
parentstaticd: Fix bfd for static route in VRF (diff)
downloadfrr-579d00e167bedfd9770cf5c1b692fa0d56f8196c.tar.xz
frr-579d00e167bedfd9770cf5c1b692fa0d56f8196c.zip
Merge pull request #13838 from ak503/static_bfd_vrf
staticd: Fix bfd for static route in VRF
Diffstat (limited to 'staticd')
-rw-r--r--staticd/static_bfd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/staticd/static_bfd.c b/staticd/static_bfd.c
index 78d8c0580..507c64e6a 100644
--- a/staticd/static_bfd.c
+++ b/staticd/static_bfd.c
@@ -88,6 +88,7 @@ void static_next_hop_bfd_monitor_enable(struct static_nexthop *sn,
bool mhop;
int family;
struct ipaddr source;
+ struct vrf *vrf = NULL;
use_interface = false;
use_source = yang_dnode_exists(dnode, "./source");
@@ -95,7 +96,7 @@ void static_next_hop_bfd_monitor_enable(struct static_nexthop *sn,
onlink = yang_dnode_exists(dnode, "../onlink") &&
yang_dnode_get_bool(dnode, "../onlink");
mhop = yang_dnode_get_bool(dnode, "./multi-hop");
-
+ vrf = vrf_lookup_by_name(yang_dnode_get_string(dnode, "../vrf"));
family = static_next_hop_type_to_family(sn);
if (family == AF_UNSPEC)
@@ -133,6 +134,8 @@ void static_next_hop_bfd_monitor_enable(struct static_nexthop *sn,
bfd_sess_set_profile(sn->bsp, use_profile ? yang_dnode_get_string(
dnode, "./profile")
: NULL);
+ if (vrf && vrf->vrf_id != VRF_UNKNOWN)
+ bfd_sess_set_vrf(sn->bsp, vrf->vrf_id);
bfd_sess_set_hop_count(sn->bsp, (onlink || mhop == false) ? 1 : 254);