summaryrefslogtreecommitdiff
path: root/ldpd/lde.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-09-12 09:46:31 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-09-13 18:58:50 -0300
commit2d67d5a2b57ae19a526e267258c71649e5e86d29 (patch)
tree907034ffd4e4b823f958c62ed974a21d852d7ff1 /ldpd/lde.c
parent7e9e78293ba77586ad59b74551ed55c3251267c9 (diff)
ldpd: fix broken label allocationfrr-3.0-rc2
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>
Diffstat (limited to 'ldpd/lde.c')
-rw-r--r--ldpd/lde.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c
index 37d64eaf50..519fcd9d11 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -1680,7 +1680,8 @@ static uint32_t
lde_get_next_label(void)
{
struct label_chunk *label_chunk;
- uint32_t i, pos, size;
+ uint32_t i, size;
+ uint64_t pos;
uint32_t label = NO_LABEL;
while (current_label_chunk) {