summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-06-15 17:35:30 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2023-06-15 17:43:40 +0300
commit054ca9b9ee760e23ac5d9f8d26d50e8fca78a887 (patch)
tree5db2853fc878a7ec0c316a1a3c95e9f2ecf2f92b /ripd
parent0fb16305200113a92e3862e05d6833217f935211 (diff)
Revert "ripd: Cleanup memory allocations on shutdown"
This reverts commit 3d1588d8ed537e3dbf120e1b2a5ad5b3c00c7897. 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>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/ripd.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 04a8cad560..7bfcaadc74 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3597,18 +3597,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;
}