]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: label manager should never return a reserved block
authorPat Ruddy <pat@voltanet.io>
Wed, 9 Dec 2020 10:23:44 +0000 (10:23 +0000)
committerPat Ruddy <pat@voltanet.io>
Mon, 4 Jan 2021 14:29:44 +0000 (14:29 +0000)
if the requested chunk size was less than 16 then a chunk
within the reserved block would be returned. Make sure that
we never return labels that are below MPLS_LABEL_UNRESERVED_MIN

Signed-off-by: Pat Ruddy <pat@voltanet.io>
zebra/label_manager.c

index feec49ecc25a8531406e398e85496e5095565323..b393e656d4c3e9603032618eed403670ac0f3ecf 100644 (file)
@@ -313,7 +313,7 @@ static struct label_manager_chunk *assign_label_chunk(uint8_t proto,
 {
        struct label_manager_chunk *lmc;
        struct listnode *node;
-       uint32_t prev_end = 0;
+       uint32_t prev_end = MPLS_LABEL_UNRESERVED_MIN;
 
        /* handle chunks request with a specific base label */
        if (base != MPLS_LABEL_BASE_ANY)