diff options
author | Mark Stapp <mjs@voltanet.io> | 2019-12-06 19:44:15 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2019-12-06 19:49:25 +0100 |
commit | 054af19a41827394bccff0eb1c235355c654c1e0 (patch) | |
tree | fe16de9ca5ba9825ca12918d7516bcb01b23d880 /sharpd | |
parent | Merge pull request #5332 from mjstapp/remove_zapi_label_flag (diff) | |
download | frr-054af19a41827394bccff0eb1c235355c654c1e0.tar.xz frr-054af19a41827394bccff0eb1c235355c654c1e0.zip |
lib,sharpd: support labelled nexthop-groups in sharpd
Update sharpd's zapi client code to support labelled nexthops if
they're present in a nexthop-group.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'sharpd')
-rw-r--r-- | sharpd/sharp_zebra.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index cd577e905..797398c79 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -265,6 +265,17 @@ void route_add(struct prefix *p, vrf_id_t vrf_id, api_nh->bh_type = nh->bh_type; break; } + + if (nh->nh_label && nh->nh_label->num_labels > 0) { + int j; + + SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_LABEL); + + api_nh->label_num = nh->nh_label->num_labels; + for (j = 0; j < nh->nh_label->num_labels; j++) + api_nh->labels[j] = nh->nh_label->label[j]; + } + i++; } api.nexthop_num = i; |