summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_zebra.c11
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;