summaryrefslogtreecommitdiff
path: root/sharpd/sharp_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd/sharp_zebra.c')
-rw-r--r--sharpd/sharp_zebra.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index f771e53f0c..f02ce4979c 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -131,13 +131,14 @@ static int interface_state_down(int command, struct zclient *zclient,
extern uint32_t total_routes;
extern uint32_t installed_routes;
-static int notify_owner(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int route_notify_owner(int command, struct zclient *zclient,
+ zebra_size_t length, vrf_id_t vrf_id)
{
struct prefix p;
enum zapi_route_notify_owner note;
+ uint32_t table;
- if (!zapi_route_notify_decode(zclient->ibuf, &p, &note))
+ if (!zapi_route_notify_decode(zclient->ibuf, &p, &table, &note))
return -1;
installed_routes++;
@@ -152,9 +153,9 @@ static void zebra_connected(struct zclient *zclient)
zclient_send_reg_requests(zclient, VRF_DEFAULT);
}
-void vrf_label_add(vrf_id_t vrf_id, mpls_label_t label)
+void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label)
{
- zclient_send_vrf_label(zclient, vrf_id, label, ZEBRA_LSP_SHARP);
+ zclient_send_vrf_label(zclient, vrf_id, afi, label, ZEBRA_LSP_SHARP);
}
void route_add(struct prefix *p, struct nexthop *nh)
@@ -168,6 +169,7 @@ void route_add(struct prefix *p, struct nexthop *nh)
api.safi = SAFI_UNICAST;
memcpy(&api.prefix, p, sizeof(*p));
+ SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
api_nh = &api.nexthops[0];
@@ -210,5 +212,5 @@ void sharp_zebra_init(void)
zclient->interface_down = interface_state_down;
zclient->interface_address_add = interface_address_add;
zclient->interface_address_delete = interface_address_delete;
- zclient->notify_owner = notify_owner;
+ zclient->route_notify_owner = route_notify_owner;
}