summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-06-17 08:26:52 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-06-20 19:50:40 +0200
commitcf8a7499346e45d6423c2e9dbe1d23769bdb316e (patch)
tree4530458d1550be87589b261c8d9a523a6efd873b /bgpd/bgp_zebra.c
parentbgpd: Retry connecting to synchronouse label manager if not ready (diff)
downloadfrr-cf8a7499346e45d6423c2e9dbe1d23769bdb316e.tar.xz
frr-cf8a7499346e45d6423c2e9dbe1d23769bdb316e.zip
bgpd: Reuse bgp_zebra_label_manager_ready() helper function
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 96aebb362..111732fdd 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -3974,7 +3974,7 @@ bool bgp_zebra_request_label_range(uint32_t base, uint32_t chunk_size)
int ret;
uint32_t start, end;
- if (!zclient_sync || zclient_sync->sock < 0)
+ if (!zclient_sync || !bgp_zebra_label_manager_ready())
return false;
ret = lm_get_label_chunk(zclient_sync, 0, base, chunk_size, &start,
@@ -4000,7 +4000,7 @@ void bgp_zebra_release_label_range(uint32_t start, uint32_t end)
{
int ret;
- if (!zclient_sync || zclient_sync->sock < 0)
+ if (!zclient_sync || !bgp_zebra_label_manager_ready())
return;
ret = lm_release_label_chunk(zclient_sync, start, end);