diff options
| author | Pat Ruddy <pat@voltanet.io> | 2020-12-16 15:06:30 +0000 | 
|---|---|---|
| committer | Pat Ruddy <pat@voltanet.io> | 2021-01-04 14:29:44 +0000 | 
| commit | 3466e2a1eafe1c9ca122ac749a94d3e08445d5df (patch) | |
| tree | c655c3d418a142b49c8eee88d5885b0d2ee439b2 /bgpd/bgp_labelpool.c | |
| parent | 78b351ddcd96640e5a0aeb4c8e3baf65a0e67fc2 (diff) | |
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.c | 2 | 
1 files changed, 1 insertions, 1 deletions
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;  	}  }  | 
