summaryrefslogtreecommitdiff
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2024-02-26 18:11:09 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2024-06-05 13:11:29 +0200
commita6de9104481814508deee38bdcf308f4693a6bca (patch)
treebe0836c357b007871aba39b83ce260d024afab59 /bgpd/bgp_zebra.c
parentae54c9e455ec7a4fb5289a6c3a28626227e83e68 (diff)
bgpd: store number of labels with 8 bits
8 bits are sufficient to store the number of labels because the current maximum is 2. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 623839d212..3558ebfd2d 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1273,7 +1273,7 @@ static void bgp_zebra_announce_parse_nexthop(
struct bgp_path_info local_info;
struct bgp_path_info *mpinfo_cp = &local_info;
mpls_label_t *labels;
- uint32_t num_labels = 0;
+ uint8_t num_labels = 0;
mpls_label_t nh_label;
int nh_othervrf = 0;
bool nh_updated = false;
@@ -4105,8 +4105,7 @@ int bgp_zebra_srv6_manager_release_locator_chunk(const char *name)
void bgp_zebra_send_nexthop_label(int cmd, mpls_label_t label,
ifindex_t ifindex, vrf_id_t vrf_id,
enum lsp_types_t ltype, struct prefix *p,
- uint32_t num_labels,
- mpls_label_t out_labels[])
+ uint8_t num_labels, mpls_label_t out_labels[])
{
struct zapi_labels zl = {};
struct zapi_nexthop *znh;