From 3466e2a1eafe1c9ca122ac749a94d3e08445d5df Mon Sep 17 00:00:00 2001 From: Pat Ruddy Date: Wed, 16 Dec 2020 15:06:30 +0000 Subject: [PATCH] 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 --- bgpd/bgp_labelpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c index c5d8bbec3b..001340be35 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; } } -- 2.39.5