summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-04-30 23:33:16 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-05-02 05:40:26 +0200
commitec2f0e53c489d40326e41b8ccef943710f112552 (patch)
tree3001be9b2c542a472432fa12284f512e4c1239cb /pimd
parentMerge pull request #2148 from opensourcerouting/snapupdate (diff)
downloadfrr-ec2f0e53c489d40326e41b8ccef943710f112552.tar.xz
frr-ec2f0e53c489d40326e41b8ccef943710f112552.zip
pimd: Fix some msdp crashes when some fundamentals change
When the underlying networking subsystem is fundamentally changed via some system controls. If we have msdp running there exists a possibility that we need to stop some running timers to prevent a crash. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_msdp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index 53a338298..829c917b0 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -228,6 +228,8 @@ static void pim_msdp_sa_upstream_update(struct pim_msdp_sa *sa,
/* release all mem associated with a sa */
static void pim_msdp_sa_free(struct pim_msdp_sa *sa)
{
+ pim_msdp_sa_state_timer_setup(sa, false);
+
XFREE(MTYPE_PIM_MSDP_SA, sa);
}
@@ -1170,6 +1172,13 @@ enum pim_msdp_err pim_msdp_peer_add(struct pim_instance *pim,
/* release all mem associated with a peer */
static void pim_msdp_peer_free(struct pim_msdp_peer *mp)
{
+ /*
+ * Let's make sure we are not running when we delete
+ * the underlying data structure
+ */
+ pim_msdp_peer_cr_timer_setup(mp, false);
+ pim_msdp_peer_ka_timer_setup(mp, false);
+
if (mp->ibuf) {
stream_free(mp->ibuf);
}
@@ -1611,6 +1620,8 @@ void pim_msdp_init(struct pim_instance *pim, struct thread_master *master)
/* counterpart to MSDP init; XXX: unused currently */
void pim_msdp_exit(struct pim_instance *pim)
{
+ pim_msdp_sa_adv_timer_setup(pim, false);
+
/* XXX: stop listener and delete all peer sessions */
if (pim->msdp.peer_hash) {