Skip to content

Commit

Permalink
bgpd: fix process_queue when un-hiding
Browse files Browse the repository at this point in the history
bgp_process_queue_init() is not called in bgp_create() when leaving the
BGP instance hidden state because of the following goto:

>	if (hidden) {
>		bgp = bgp_old;
>		goto peer_init;
>	}

Upon reconfiguration of the default instance, the prefixes are never set
into a meta queue by mq_add_handler(). They are never processed for
zebra RIB installation and announcements of update/withdraw.

Do not delete the BGP process_queue when hiding.

Fixes: 4d0e7a4 ("bgpd: VRF-Lite fix default bgp delete")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
  • Loading branch information
louis-6wind committed Feb 12, 2025
1 parent 240a81e commit 3961764
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4255,12 +4255,11 @@ int bgp_delete(struct bgp *bgp)
bgp_set_evpn(bgp_get_default());
}

if (bgp->process_queue)
work_queue_free_and_null(&bgp->process_queue);

if (!IS_BGP_INSTANCE_HIDDEN(bgp))
if (!IS_BGP_INSTANCE_HIDDEN(bgp)) {
if (bgp->process_queue)
work_queue_free_and_null(&bgp->process_queue);
bgp_unlock(bgp); /* initial reference */
else {
} else {
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
enum vpn_policy_direction dir;

Expand Down

0 comments on commit 3961764

Please sign in to comment.