Skip to content

Commit 2d67d5a

Browse files
committed
ldpd: fix broken label allocation
Once ldpd allocated label 48 for a given FEC, all subsequent requests for a new label would return the same value (48). The problem is that we were left shifting an uint32_t value up to 64 times, losing important information. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
1 parent 7e9e782 commit 2d67d5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ldpd/lde.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,8 @@ static uint32_t
16801680
lde_get_next_label(void)
16811681
{
16821682
struct label_chunk *label_chunk;
1683-
uint32_t i, pos, size;
1683+
uint32_t i, size;
1684+
uint64_t pos;
16841685
uint32_t label = NO_LABEL;
16851686

16861687
while (current_label_chunk) {

0 commit comments

Comments
 (0)