diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2025-02-12 13:09:37 +0100 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2025-02-27 09:43:55 +0100 |
| commit | cec0da3d9b26b718ae8975e0741c6ffac3bcf750 (patch) | |
| tree | fd3dcccf9e4ef6b1e3536236e9dff1bf0f14f333 /bgpd/bgpd.c | |
| parent | 64dba6b488cc9905811477bb9677c8ca2c205f6b (diff) | |
bgpd: fix process_queue when un-hiding
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: 4d0e7a49cf ("bgpd: VRF-Lite fix default bgp delete")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 71a3756f2dda272e69727fa416bca12c016d9567)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd/bgpd.c')
| -rw-r--r-- | bgpd/bgpd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 7b60c4fc17..edda82b63c 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4257,12 +4257,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; |
