mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 23:08:38 +00:00
pim: fix order of vxlan mroutes cleanup when pimd is shutdown
1. vxlan instance cleanup needs to be done before the upstream entries are force-flushed. 2. also vxlan callbacks need to be ignored post instance-cleanup. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
745fc7a5ec
commit
b21e0c9375
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
static void pim_instance_terminate(struct pim_instance *pim)
|
static void pim_instance_terminate(struct pim_instance *pim)
|
||||||
{
|
{
|
||||||
|
pim_vxlan_exit(pim);
|
||||||
|
|
||||||
if (pim->ssm_info) {
|
if (pim->ssm_info) {
|
||||||
pim_ssm_terminate(pim->ssm_info);
|
pim_ssm_terminate(pim->ssm_info);
|
||||||
pim->ssm_info = NULL;
|
pim->ssm_info = NULL;
|
||||||
@ -60,7 +62,6 @@ static void pim_instance_terminate(struct pim_instance *pim)
|
|||||||
pim_oil_terminate(pim);
|
pim_oil_terminate(pim);
|
||||||
|
|
||||||
pim_msdp_exit(pim);
|
pim_msdp_exit(pim);
|
||||||
pim_vxlan_exit(pim);
|
|
||||||
|
|
||||||
XFREE(MTYPE_PIM_PIM_INSTANCE, pim);
|
XFREE(MTYPE_PIM_PIM_INSTANCE, pim);
|
||||||
}
|
}
|
||||||
|
@ -858,7 +858,9 @@ static void pim_vxlan_set_default_iif(struct pim_instance *pim,
|
|||||||
/* add/del upstream entries for the existing vxlan SG when the
|
/* add/del upstream entries for the existing vxlan SG when the
|
||||||
* interface becomes available
|
* interface becomes available
|
||||||
*/
|
*/
|
||||||
hash_iterate(pim->vxlan.sg_hash, pim_vxlan_orig_mr_iif_update, ifp);
|
if (pim->vxlan.sg_hash)
|
||||||
|
hash_iterate(pim->vxlan.sg_hash,
|
||||||
|
pim_vxlan_orig_mr_iif_update, ifp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pim_vxlan_set_peerlink_rif(struct pim_instance *pim,
|
static void pim_vxlan_set_peerlink_rif(struct pim_instance *pim,
|
||||||
@ -889,7 +891,9 @@ static void pim_vxlan_set_peerlink_rif(struct pim_instance *pim,
|
|||||||
/* add/del upstream entries for the existing vxlan SG when the
|
/* add/del upstream entries for the existing vxlan SG when the
|
||||||
* interface becomes available
|
* interface becomes available
|
||||||
*/
|
*/
|
||||||
hash_iterate(pim->vxlan.sg_hash, pim_vxlan_orig_mr_iif_update, ifp);
|
if (pim->vxlan.sg_hash)
|
||||||
|
hash_iterate(pim->vxlan.sg_hash,
|
||||||
|
pim_vxlan_orig_mr_iif_update, ifp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pim_vxlan_add_vif(struct interface *ifp)
|
void pim_vxlan_add_vif(struct interface *ifp)
|
||||||
@ -972,6 +976,8 @@ void pim_vxlan_add_term_dev(struct pim_instance *pim,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pim->vxlan.term_if = ifp;
|
pim->vxlan.term_if = ifp;
|
||||||
|
|
||||||
|
if (pim->vxlan.sg_hash)
|
||||||
hash_iterate(pim_ifp->pim->vxlan.sg_hash,
|
hash_iterate(pim_ifp->pim->vxlan.sg_hash,
|
||||||
pim_vxlan_term_mr_oif_update, ifp);
|
pim_vxlan_term_mr_oif_update, ifp);
|
||||||
}
|
}
|
||||||
@ -985,6 +991,8 @@ void pim_vxlan_del_term_dev(struct pim_instance *pim)
|
|||||||
zlog_debug("vxlan term oif changed from %s to -", ifp->name);
|
zlog_debug("vxlan term oif changed from %s to -", ifp->name);
|
||||||
|
|
||||||
pim->vxlan.term_if = NULL;
|
pim->vxlan.term_if = NULL;
|
||||||
|
|
||||||
|
if (pim->vxlan.sg_hash)
|
||||||
hash_iterate(pim->vxlan.sg_hash,
|
hash_iterate(pim->vxlan.sg_hash,
|
||||||
pim_vxlan_term_mr_oif_update, NULL);
|
pim_vxlan_term_mr_oif_update, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user