summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_labelpool.c
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2020-12-16 16:06:30 +0100
committerPat Ruddy <pat@voltanet.io>2021-01-04 15:29:44 +0100
commit3466e2a1eafe1c9ca122ac749a94d3e08445d5df (patch)
treec655c3d418a142b49c8eee88d5885b0d2ee439b2 /bgpd/bgp_labelpool.c
parentbgpd: release label to labelpool on dereg (diff)
downloadfrr-3466e2a1eafe1c9ca122ac749a94d3e08445d5df.tar.xz
frr-3466e2a1eafe1c9ca122ac749a94d3e08445d5df.zip
bgpd: fix zclient return code damage in labelpool
The check for the return code for zclient_send_get_label_chunk is reversed and therefore the pending count does not get incremented for each successful label chunk request. This has the effect of requesting a 50 label chunk per label request from BGP i.e we request 50 times the labels we require. Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'bgpd/bgp_labelpool.c')
-rw-r--r--bgpd/bgp_labelpool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c
index c5d8bbec3..001340be3 100644
--- a/bgpd/bgp_labelpool.c
+++ b/bgpd/bgp_labelpool.c
@@ -394,7 +394,7 @@ void bgp_lp_get(
return;
if (zclient_send_get_label_chunk(zclient, 0, LP_CHUNK_SIZE,
MPLS_LABEL_BASE_ANY)
- == ZCLIENT_SEND_FAILURE)
+ != ZCLIENT_SEND_FAILURE)
lp->pending_count += LP_CHUNK_SIZE;
}
}