summaryrefslogtreecommitdiffstats
path: root/zebra/label_manager.c
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2020-04-03 00:05:44 +0200
committerEmanuele Di Pascale <emanuele@voltanet.io>2020-04-07 11:33:16 +0200
commit1935832264935a3b20d498cd70974662e7b61be5 (patch)
tree70f9399e7819e2528149c275e4fe20041e9ee498 /zebra/label_manager.c
parentMerge pull request #6167 from qlyoung/fix-cluster-list-uaf (diff)
downloadfrr-1935832264935a3b20d498cd70974662e7b61be5.tar.xz
frr-1935832264935a3b20d498cd70974662e7b61be5.zip
zebra: minor fix to label manager log
zebra should only check whether a get_chunk operation succeeded when processing the response, rather than insde the get_chunk call itself. Spllitting the request and response hooks was done precisely to allow for asynchronous calls to an external label manager; in this case, the requested chunk is not necessarily going to be available at request time. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'zebra/label_manager.c')
-rw-r--r--zebra/label_manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/zebra/label_manager.c b/zebra/label_manager.c
index 0825fb55c..5f2128a09 100644
--- a/zebra/label_manager.c
+++ b/zebra/label_manager.c
@@ -446,6 +446,15 @@ int lm_client_connect_response(uint8_t proto, uint16_t instance,
int lm_get_chunk_response(struct label_manager_chunk *lmc, uint8_t proto,
uint16_t instance, vrf_id_t vrf_id)
{
+ if (!lmc)
+ flog_err(EC_ZEBRA_LM_CANNOT_ASSIGN_CHUNK,
+ "Unable to assign Label Chunk to %s instance %u",
+ zebra_route_string(proto), instance);
+ else if (IS_ZEBRA_DEBUG_PACKET)
+ zlog_debug("Assigned Label Chunk %u - %u to %s instance %u",
+ lmc->start, lmc->end, zebra_route_string(proto),
+ instance);
+
struct zserv *client = zserv_find_client(proto, instance);
if (!client) {
zlog_err("%s: could not find client for daemon %s instance %u",