summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-06-15 17:42:05 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-06-20 14:41:46 +0000
commit6cf7339d945f6aeba4c2b78ab9062254f07c9ebb (patch)
tree6ee7e445e2abb3dfee9fe6b4f0c2a4970f29f624
parentb3b5739128bab4bddba8ff0be36ca9d65b54afff (diff)
Revert "ripngd: Cleanup memory allocations on shutdown"mergify/bp/dev/9.0/pr-13800
This reverts commit b1d29673ca16e558aea5d632da181555c83980cf. This commit introduced a crash. When the VRF is deleted, the RIPNG 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 ripng vrf vrf1 frr(config-router)# exit frr(config)# no vrf vrf1 frr(config)# no router ripng vrf vrf1 vtysh: error reading from ripngd: Resource temporarily unavailable (11)Warning: closing connection to ripngd because of an I/O error! frr(config)# ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit 9f6dade90e5e4686f67ae17b42c2873ec7ca6532)
-rw-r--r--ripngd/ripngd.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 7269e76656..d5618b63f2 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2624,17 +2624,10 @@ static int ripng_vrf_new(struct vrf *vrf)
static int ripng_vrf_delete(struct vrf *vrf)
{
- struct ripng *ripng;
-
if (IS_RIPNG_DEBUG_EVENT)
zlog_debug("%s: VRF deleted: %s(%u)", __func__, vrf->name,
vrf->vrf_id);
- ripng = ripng_lookup_by_vrf_name(vrf->name);
- if (!ripng)
- return 0;
-
- ripng_clean(ripng);
return 0;
}