summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2021-04-01 17:55:05 +0200
committerStephen Worley <sworley@nvidia.com>2023-02-14 00:12:05 +0100
commit90aaed169f9c7f365a1c8bb3a43da5f5ed611cdf (patch)
tree7bbab0821dcf70f8e7b947170d9a0ad30d8bb948 /sharpd
parentzebra: encode vni label via lwt encap (diff)
downloadfrr-90aaed169f9c7f365a1c8bb3a43da5f5ed611cdf.tar.xz
frr-90aaed169f9c7f365a1c8bb3a43da5f5ed611cdf.zip
lib,sharpd: add ability for sharpd to install vni labels
Add the ability for sharpd to install vni labels for testing. This patch is just for testing/dev work purposes with evpn. It adds some code to vty for nexthop-groups so we can explicitly add a label to nexthops and then let sharpd encode them to zebra. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_zebra.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index bf5b98544..0da480423 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -271,6 +271,11 @@ static bool route_add(const struct prefix *p, vrf_id_t vrf_id, uint8_t instance,
api.nhgid = nhgid;
} else {
for (ALL_NEXTHOPS_PTR(nhg, nh)) {
+ /* Check if we set a VNI label */
+ if (nh->nh_label
+ && (nh->nh_label_type == ZEBRA_LSP_EVPN))
+ SET_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE);
+
api_nh = &api.nexthops[i];
zapi_nexthop_from_nexthop(api_nh, nh);