if (lcbq->label == MPLS_LABEL_NONE) {
/* shouldn't happen */
- flog_err(BGP_ERR_LABEL, "%s: error: label==MPLS_LABEL_NONE",
- __func__);
+ flog_err(EC_BGP_LABEL, "%s: error: label==MPLS_LABEL_NONE",
+ __func__);
return WQ_SUCCESS;
}
skiplist_free(lp->inuse);
lp->inuse = NULL;
- list_delete_and_null(&lp->chunks);
+ list_delete(&lp->chunks);
while ((lf = LABEL_FIFO_HEAD(lp->requests))) {
if (rc) {
/* shouldn't happen */
- flog_err(BGP_ERR_LABEL,
- "%s: can't insert new LCB into ledger list",
- __func__);
+ flog_err(EC_BGP_LABEL,
+ "%s: can't insert new LCB into ledger list",
+ __func__);
XFREE(MTYPE_BGP_LABEL_CB, lcb);
return;
}
struct lp_fifo *lf;
if (last < first) {
- flog_err(BGP_ERR_LABEL,
- "%s: zebra label chunk invalid: first=%u, last=%u",
- __func__, first, last);
+ flog_err(EC_BGP_LABEL,
+ "%s: zebra label chunk invalid: first=%u, last=%u",
+ __func__, first, last);
return;
}
int chunks_needed;
void *labelid;
struct lp_lcb *lcb;
+ int lm_init_ok;
/*
* Get label chunk allocation request dispatched to zebra
chunks_needed = (labels_needed / LP_CHUNK_SIZE) + 1;
labels_needed = chunks_needed * LP_CHUNK_SIZE;
+ lm_init_ok = lm_label_manager_connect(zclient, 1) == 0;
+
+ if (!lm_init_ok)
+ zlog_err("%s: label manager connection error", __func__);
+
zclient_send_get_label_chunk(zclient, 0, labels_needed);
lp->pending_count = labels_needed;