summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-09-12 19:47:18 +0200
committerGitHub <noreply@github.com>2021-09-12 19:47:18 +0200
commit0f64a435db8c92b578408b9aab9de29e0b15b4dd (patch)
tree710f5de3b6d3ed26d8e4d0441f3c0e4f2c321641 /lib
parentMerge pull request #9019 from pjdruddy/ospfv3-early-break-list-walk (diff)
parentbgpd: VRF-Lite fix nexthop type (diff)
downloadfrr-0f64a435db8c92b578408b9aab9de29e0b15b4dd.tar.xz
frr-0f64a435db8c92b578408b9aab9de29e0b15b4dd.zip
Merge pull request #9475 from iqras23/change1
bgpd: VRF-Lite fix nexthop type
Diffstat (limited to 'lib')
-rw-r--r--lib/nexthop.c5
-rw-r--r--lib/nexthop.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index 23e3a2b73..98409c76c 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -519,12 +519,13 @@ struct nexthop *nexthop_from_ipv6_ifindex(const struct in6_addr *ipv6,
return nexthop;
}
-struct nexthop *nexthop_from_blackhole(enum blackhole_type bh_type)
+struct nexthop *nexthop_from_blackhole(enum blackhole_type bh_type,
+ vrf_id_t nh_vrf_id)
{
struct nexthop *nexthop;
nexthop = nexthop_new();
- nexthop->vrf_id = VRF_DEFAULT;
+ nexthop->vrf_id = nh_vrf_id;
nexthop->type = NEXTHOP_TYPE_BLACKHOLE;
nexthop->bh_type = bh_type;
diff --git a/lib/nexthop.h b/lib/nexthop.h
index dd65509ae..320b46315 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -182,7 +182,8 @@ struct nexthop *nexthop_from_ipv6(const struct in6_addr *ipv6,
vrf_id_t vrf_id);
struct nexthop *nexthop_from_ipv6_ifindex(const struct in6_addr *ipv6,
ifindex_t ifindex, vrf_id_t vrf_id);
-struct nexthop *nexthop_from_blackhole(enum blackhole_type bh_type);
+struct nexthop *nexthop_from_blackhole(enum blackhole_type bh_type,
+ vrf_id_t nh_vrf_id);
/*
* Hash a nexthop. Suitable for use with hash tables.