ifindex_t ifindex;
safi_t safi;
int ret;
+ enum lsp_types_t label_type;
mpls_label_t label;
struct nexthop *nexthop;
zserv_nexthop_num_warn(__func__, (const struct prefix *)&p,
nexthop_num);
+ if (CHECK_FLAG(message, ZAPI_MESSAGE_LABEL))
+ label_type = lsp_type_from_re_type(client->proto);
+
for (i = 0; i < nexthop_num; i++) {
nexthop_type = stream_getc(s);
* by label. */
if (CHECK_FLAG(message, ZAPI_MESSAGE_LABEL)) {
label = (mpls_label_t)stream_getl(s);
- nexthop_add_labels(
- nexthop, nexthop->nh_label_type,
- 1, &label);
+ nexthop_add_labels(nexthop, label_type,
+ 1, &label);
}
break;
case NEXTHOP_TYPE_IPV4_IFINDEX:
static unsigned int ifindices[MULTIPATH_NUM];
int ret;
static mpls_label_t labels[MULTIPATH_NUM];
+ enum lsp_types_t label_type;
mpls_label_t label;
struct nexthop *nexthop;
nexthop_num = stream_getc(s);
zserv_nexthop_num_warn(__func__, (const struct prefix *)&p,
nexthop_num);
+
+ if (CHECK_FLAG(message, ZAPI_MESSAGE_LABEL))
+ label_type = lsp_type_from_re_type(client->proto);
+
for (i = 0; i < nexthop_num; i++) {
nexthop_type = stream_getc(s);
re, &nexthops[i]);
if (CHECK_FLAG(message, ZAPI_MESSAGE_LABEL))
- nexthop_add_labels(
- nexthop, nexthop->nh_label_type,
- 1, &labels[i]);
+ nexthop_add_labels(nexthop, label_type,
+ 1, &labels[i]);
} else {
if ((i < if_count) && ifindices[i])
route_entry_nexthop_ifindex_add(
static unsigned int ifindices[MULTIPATH_NUM];
int ret;
static mpls_label_t labels[MULTIPATH_NUM];
+ enum lsp_types_t label_type;
mpls_label_t label;
struct nexthop *nexthop;
nexthop_num = stream_getc(s);
zserv_nexthop_num_warn(__func__, (const struct prefix *)&p,
nexthop_num);
+
+ if (CHECK_FLAG(message, ZAPI_MESSAGE_LABEL))
+ label_type = lsp_type_from_re_type(client->proto);
+
for (i = 0; i < nexthop_num; i++) {
nexthop_type = stream_getc(s);
nexthop = route_entry_nexthop_ipv6_add(
re, &nexthops[i]);
if (CHECK_FLAG(message, ZAPI_MESSAGE_LABEL))
- nexthop_add_labels(
- nexthop, nexthop->nh_label_type,
- 1, &labels[i]);
+ nexthop_add_labels(nexthop, label_type,
+ 1, &labels[i]);
} else {
if ((i < if_count) && ifindices[i])
route_entry_nexthop_ifindex_add(