Skip to content

Commit

Permalink
Merge pull request #16749 from opensourcerouting/fix/issue_16747
Browse files Browse the repository at this point in the history
bgpd: Retry connecting to label manager if failed
  • Loading branch information
mjstapp authored Sep 5, 2024
2 parents 4f185c5 + befffb2 commit 7fef8d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bgpd/bgp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -3583,14 +3583,17 @@ void bgp_if_init(void)
hook_register_prio(if_del, 0, bgp_if_delete_hook);
}

static void bgp_start_label_manager(struct event *start)
static bool bgp_zebra_label_manager_ready(void)
{
bgp_zebra_label_manager_connect();
return (zclient_sync->sock > 0);
}

static bool bgp_zebra_label_manager_ready(void)
static void bgp_start_label_manager(struct event *start)
{
return (zclient_sync->sock > 0);
if (!bgp_zebra_label_manager_ready() &&
!bgp_zebra_label_manager_connect())
event_add_timer(bm->master, bgp_start_label_manager, NULL, 1,
&bm->t_bgp_start_label_manager);
}

static bool bgp_zebra_label_manager_connect(void)
Expand Down

0 comments on commit 7fef8d3

Please sign in to comment.