summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index ab55998af0..f32d8ea6c6 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -509,9 +509,8 @@ int zsend_interface_update(int cmd, struct zserv *client, struct interface *ifp)
return zserv_send_message(client, s);
}
-int zsend_redistribute_route(int cmd, struct zserv *client,
- const struct route_node *rn,
- const struct route_entry *re, bool is_table_direct)
+int zsend_redistribute_route(int cmd, struct zserv *client, const struct route_node *rn,
+ const struct route_entry *re, vrf_id_t *to_vrf)
{
struct zapi_route api;
struct zapi_nexthop *api_nh;
@@ -527,9 +526,10 @@ int zsend_redistribute_route(int cmd, struct zserv *client,
api.vrf_id = re->vrf_id;
api.type = re->type;
api.safi = SAFI_UNICAST;
- if (is_table_direct) {
+ if (to_vrf != NULL) {
api.instance = re->table;
api.type = ZEBRA_ROUTE_TABLE_DIRECT;
+ api.vrf_id = *to_vrf;
} else
api.instance = re->instance;
api.flags = re->flags;
@@ -598,7 +598,7 @@ int zsend_redistribute_route(int cmd, struct zserv *client,
/* Attributes. */
SET_FLAG(api.message, ZAPI_MESSAGE_DISTANCE);
- if (is_table_direct)
+ if (to_vrf != NULL)
api.distance = ZEBRA_TABLEDIRECT_DISTANCE_DEFAULT;
else
api.distance = re->distance;