mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 12:52:49 +00:00
Merge pull request #2850 from patrasar/Fix_2363
Fix pim_mroute_del crash while killing pimd
This commit is contained in:
commit
61929aa5f9
@ -174,7 +174,16 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
|
||||
ifchannel list is empty before deleting upstream_del
|
||||
ref count will take care of it.
|
||||
*/
|
||||
pim_upstream_del(pim_ifp->pim, ch->upstream, __PRETTY_FUNCTION__);
|
||||
if (ch->upstream->ref_count > 0)
|
||||
pim_upstream_del(pim_ifp->pim, ch->upstream,
|
||||
__PRETTY_FUNCTION__);
|
||||
|
||||
else
|
||||
zlog_warn("%s: Avoiding deletion of upstream with ref_count %d "
|
||||
"from ifchannel(%s): %s", __PRETTY_FUNCTION__,
|
||||
ch->upstream->ref_count, ch->interface->name,
|
||||
ch->sg_str);
|
||||
|
||||
ch->upstream = NULL;
|
||||
|
||||
THREAD_OFF(ch->t_ifjoin_expiry_timer);
|
||||
|
@ -167,6 +167,8 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
|
||||
up->ref_count, up->flags,
|
||||
up->channel_oil->oil_ref_count);
|
||||
|
||||
assert(up->ref_count > 0);
|
||||
|
||||
--up->ref_count;
|
||||
|
||||
if (up->ref_count >= 1)
|
||||
|
Loading…
Reference in New Issue
Block a user