diff options
| author | Stephen Worley <sworley@nvidia.com> | 2021-04-01 11:55:05 -0400 | 
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2023-02-13 18:12:05 -0500 | 
| commit | 90aaed169f9c7f365a1c8bb3a43da5f5ed611cdf (patch) | |
| tree | 7bbab0821dcf70f8e7b947170d9a0ad30d8bb948 /sharpd | |
| parent | 5fa6bfffb1201c98960ea8a3808d6e1e7ed8c312 (diff) | |
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.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index bf5b98544e..0da4804231 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);  | 
