diff options
author | Mark Stapp <mjs@voltanet.io> | 2019-11-13 22:06:06 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2019-12-06 16:17:20 +0100 |
commit | 68a02e06e5f103048d947262c08c569056f74d1c (patch) | |
tree | 2916c9a6284473d8d6b42e69458226ee97943543 /staticd | |
parent | lib: use const in several stream lib apis (diff) | |
download | frr-68a02e06e5f103048d947262c08c569056f74d1c.tar.xz frr-68a02e06e5f103048d947262c08c569056f74d1c.zip |
*: 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')
-rw-r--r-- | staticd/static_zebra.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index a474613b4..42646d15b 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]; |