diff options
| author | Russ White <russ@riw.us> | 2025-01-28 10:24:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-28 10:24:00 -0500 |
| commit | 7b6f686a9fd634cc00a4be63af05d41ac239f8ce (patch) | |
| tree | 8ae651a644087b8596899d5d5aaf00825914533f /zebra/zapi_msg.c | |
| parent | ee67699bd7e0175057ffab4c8c30c74b6c7cc844 (diff) | |
| parent | 5846339eae91b83cf2c78cfab2e5c1a1013f456e (diff) | |
Merge pull request #17736 from opensourcerouting/table-direct
bgpd,lib,zebra: permit table-direct on VRFs
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 10 |
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; |
