mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 07:37:54 +00:00
Revert "ripd: Cleanup memory allocations on shutdown"
This reverts commit3d1588d8ed
. This commit introduced a crash. When the VRF is deleted, the RIP instance should not be freed, because the NB infrastructure still stores the pointer to it. The instance should be deleted only when it's actually deleted from the configuration. To reproduce the crash: ``` frr# conf t frr(config)# vrf vrf1 frr(config-vrf)# exit frr(config)# router rip vrf vrf1 frr(config-router)# exit frr(config)# no vrf vrf1 frr(config)# no router rip vrf vrf1 vtysh: error reading from ripd: Resource temporarily unavailable (11)Warning: closing connection to ripd because of an I/O error! frr(config)# ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit054ca9b9ee
)
This commit is contained in:
parent
04c9a280c1
commit
56a51f7edd
@ -3551,18 +3551,10 @@ static int rip_vrf_new(struct vrf *vrf)
|
||||
|
||||
static int rip_vrf_delete(struct vrf *vrf)
|
||||
{
|
||||
struct rip *rip;
|
||||
|
||||
if (IS_RIP_DEBUG_EVENT)
|
||||
zlog_debug("%s: VRF deleted: %s(%u)", __func__, vrf->name,
|
||||
vrf->vrf_id);
|
||||
|
||||
rip = rip_lookup_by_vrf_name(vrf->name);
|
||||
if (!rip)
|
||||
return 0;
|
||||
|
||||
rip_clean(rip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user