]> git.puffer.fish Git - matthieu/frr.git/commit
Revert "ripd: Cleanup memory allocations on shutdown"
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 15 Jun 2023 14:35:30 +0000 (17:35 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 20 Jun 2023 14:41:33 +0000 (14:41 +0000)
commitde1fae613822af18a27b1cd01769666fb17a5816
treed19a2d68df83a4b6266cd6a3a37efbd801bf6ad4
parent45e36c0c00a517ad1606135b18c5753e210cfc0d
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>
(cherry picked from commit 054ca9b9ee760e23ac5d9f8d26d50e8fca78a887)
ripd/ripd.c