mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 01:57:26 +00:00
Merge pull request #5498 from mjstapp/sharp_with_labels
lib,sharpd: support labelled nexthop-groups in sharpd
This commit is contained in:
commit
0dcbec72aa
@ -376,6 +376,9 @@ void nexthop_add_labels(struct nexthop *nexthop, enum lsp_types_t type,
|
|||||||
struct mpls_label_stack *nh_label;
|
struct mpls_label_stack *nh_label;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (num_labels == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
nexthop->nh_label_type = type;
|
nexthop->nh_label_type = type;
|
||||||
nh_label = XCALLOC(MTYPE_NH_LABEL,
|
nh_label = XCALLOC(MTYPE_NH_LABEL,
|
||||||
sizeof(struct mpls_label_stack)
|
sizeof(struct mpls_label_stack)
|
||||||
|
@ -265,6 +265,17 @@ void route_add(struct prefix *p, vrf_id_t vrf_id,
|
|||||||
api_nh->bh_type = nh->bh_type;
|
api_nh->bh_type = nh->bh_type;
|
||||||
break;
|
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++;
|
i++;
|
||||||
}
|
}
|
||||||
api.nexthop_num = i;
|
api.nexthop_num = i;
|
||||||
|
Loading…
Reference in New Issue
Block a user