summaryrefslogtreecommitdiff
path: root/staticd/static_zebra.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-11-13 16:06:06 -0500
committerMark Stapp <mjs@voltanet.io>2019-12-06 10:17:20 -0500
commit68a02e06e5f103048d947262c08c569056f74d1c (patch)
tree2916c9a6284473d8d6b42e69458226ee97943543 /staticd/static_zebra.c
parentd3d77ec42f9ece5a52e5af26b7ff2fb5607ad6c4 (diff)
*: revise zapi nexthop encoding
Use a per-nexthop flag to indicate the presence of labels; add some utility zapi encode/decode apis for nexthops; use the zapi apis more consistently. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'staticd/static_zebra.c')
-rw-r--r--staticd/static_zebra.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c
index a474613b4d..42646d15bc 100644
--- a/staticd/static_zebra.c
+++ b/staticd/static_zebra.c
@@ -388,7 +388,8 @@ extern void static_zebra_route_add(struct route_node *rn,
continue;
api_nh->vrf_id = si->nh_vrf_id;
- api_nh->onlink = si->onlink;
+ if (si->onlink)
+ SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_ONLINK);
si->state = STATIC_SENT_TO_ZEBRA;
@@ -441,7 +442,7 @@ extern void static_zebra_route_add(struct route_node *rn,
if (si->snh_label.num_labels) {
int i;
- SET_FLAG(api.message, ZAPI_MESSAGE_LABEL);
+ SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_LABEL);
api_nh->label_num = si->snh_label.num_labels;
for (i = 0; i < api_nh->label_num; i++)
api_nh->labels[i] = si->snh_label.label[i];