diff options
author | ßingen <bingen@voltanet.io> | 2016-09-15 12:28:52 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-23 15:31:21 +0200 |
commit | e2a4192a42ecda4f431ba8f9a4d47e4e75417659 (patch) | |
tree | edeb968ffc478d7a43a07bdb4af9bf1dce462976 /lib | |
parent | zebra: install MPLS CLI commands only if MPLS is enabled. (diff) | |
download | frr-e2a4192a42ecda4f431ba8f9a4d47e4e75417659.tar.xz frr-e2a4192a42ecda4f431ba8f9a4d47e4e75417659.zip |
zebra: fix bug in nexthop label allocation
Label array in nexthop_label struct was not being allocated.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nexthop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c index 01771e253..23ee28b7d 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -171,7 +171,8 @@ nexthop_add_labels (struct nexthop *nexthop, enum lsp_types_t type, int i; nexthop->nh_label_type = type; - nh_label = XCALLOC (MTYPE_NH_LABEL, sizeof (struct nexthop_label)); + nh_label = XCALLOC (MTYPE_NH_LABEL, sizeof (struct nexthop_label) + + num_labels * sizeof (mpls_label_t)); nh_label->num_labels = num_labels; for (i = 0; i < num_labels; i++) nh_label->label[i] = *(label + i); |