summaryrefslogtreecommitdiff
path: root/lib/nexthop.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-12-06 13:44:15 -0500
committerMark Stapp <mjs@voltanet.io>2019-12-06 13:49:25 -0500
commit054af19a41827394bccff0eb1c235355c654c1e0 (patch)
treefe16de9ca5ba9825ca12918d7516bcb01b23d880 /lib/nexthop.c
parenta44dcdee5589a9352bc2d2d9a69c281663701e8a (diff)
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 'lib/nexthop.c')
-rw-r--r--lib/nexthop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index f314fea697..ce8034846f 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -376,6 +376,9 @@ void nexthop_add_labels(struct nexthop *nexthop, enum lsp_types_t type,
struct mpls_label_stack *nh_label;
int i;
+ if (num_labels == 0)
+ return;
+
nexthop->nh_label_type = type;
nh_label = XCALLOC(MTYPE_NH_LABEL,
sizeof(struct mpls_label_stack)