diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2018-05-03 09:40:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-03 09:40:23 -0500 |
| commit | 31569f0bbcc0e032bdaf1550442e24a770d6b70d (patch) | |
| tree | b86cbd431200de4612dafbd2d8f42f53f9ce5cfc /pimd/pim_msdp.c | |
| parent | 6d8fa7643d5baf3b04cbe38501c05aad65657fe1 (diff) | |
| parent | ec2f0e53c489d40326e41b8ccef943710f112552 (diff) | |
Merge pull request #2159 from donaldsharp/msdp_crash
pimd: Fix some msdp crashes when some fundamentals change
Diffstat (limited to 'pimd/pim_msdp.c')
| -rw-r--r-- | pimd/pim_msdp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 53a3382987..829c917b0f 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) { |
