]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldpd: fix broken label allocation frr-3.0-rc2
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 12 Sep 2017 12:46:31 +0000 (09:46 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 13 Sep 2017 21:58:50 +0000 (18:58 -0300)
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>
ldpd/lde.c

index 37d64eaf5027fcf8b413002f16f03b7bb610d086..519fcd9d1191d1fabce5453162c87948ea6c834d 100644 (file)
@@ -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) {