summaryrefslogtreecommitdiff
path: root/sharpd/sharp_zebra.c
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@cumulusnetworks.com>2018-02-21 00:36:58 -0800
committerGitHub <noreply@github.com>2018-02-21 00:36:58 -0800
commitf487dcaf74c9bd7a716a749d15281d5b92d363d4 (patch)
tree5362b8a4081b3b8a13038fa520c8d66a95c0192e /sharpd/sharp_zebra.c
parent7fdaec88941d66d831363d32084cc88c5b98ac6c (diff)
parent4298f5e937a1fa689047697395f8b741fb9b3d15 (diff)
Merge branch 'master' into evpn-bug-fixes
Diffstat (limited to 'sharpd/sharp_zebra.c')
-rw-r--r--sharpd/sharp_zebra.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index 25bb512a8b..78e8cf0adc 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -152,6 +152,11 @@ static void zebra_connected(struct zclient *zclient)
zclient_send_reg_requests(zclient, VRF_DEFAULT);
}
+void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label)
+{
+ zclient_send_vrf_label(zclient, vrf_id, afi, label, ZEBRA_LSP_SHARP);
+}
+
void route_add(struct prefix *p, struct nexthop *nh)
{
struct zapi_route api;
@@ -159,7 +164,6 @@ void route_add(struct prefix *p, struct nexthop *nh)
memset(&api, 0, sizeof(api));
api.vrf_id = VRF_DEFAULT;
- api.nh_vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_SHARP;
api.safi = SAFI_UNICAST;
memcpy(&api.prefix, p, sizeof(*p));
@@ -167,6 +171,7 @@ void route_add(struct prefix *p, struct nexthop *nh)
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
api_nh = &api.nexthops[0];
+ api_nh->vrf_id = VRF_DEFAULT;
api_nh->gate.ipv4 = nh->gate.ipv4;
api_nh->type = nh->type;
api_nh->ifindex = nh->ifindex;
@@ -181,7 +186,6 @@ void route_delete(struct prefix *p)
memset(&api, 0, sizeof(api));
api.vrf_id = VRF_DEFAULT;
- api.nh_vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_SHARP;
api.safi = SAFI_UNICAST;
memcpy(&api.prefix, p, sizeof(*p));