summaryrefslogtreecommitdiff
path: root/zebra/label_manager.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-01-09 15:48:22 -0500
committerGitHub <noreply@github.com>2021-01-09 15:48:22 -0500
commit7df0e6bb3b61d134af44d3e88490d3a6f971e992 (patch)
tree405ee3041f272070c2be4c82e1c734d62e755d6b /zebra/label_manager.c
parent24420c8200da3bc3c86ab84daea67c138535c543 (diff)
parent160ad964e78bd948cdc5ab336fe9afa93d88b640 (diff)
Merge pull request #7756 from pjdruddy/bgplu-fixes
Bgplu fixes
Diffstat (limited to 'zebra/label_manager.c')
-rw-r--r--zebra/label_manager.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zebra/label_manager.c b/zebra/label_manager.c
index ef51669022..2634a333ee 100644
--- a/zebra/label_manager.c
+++ b/zebra/label_manager.c
@@ -306,7 +306,7 @@ assign_label_chunk(uint8_t proto, unsigned short instance, uint32_t session_id,
{
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)
@@ -328,8 +328,7 @@ assign_label_chunk(uint8_t proto, unsigned short instance, uint32_t session_id,
}
/* check if we hadve a "hole" behind us that we can squeeze into
*/
- if ((lmc->start > prev_end)
- && (lmc->start - prev_end >= size)) {
+ if ((lmc->start > prev_end) && (lmc->start - prev_end > size)) {
lmc = create_label_chunk(proto, instance, session_id,
keep, prev_end + 1,
prev_end + size);