summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2020-10-09 14:14:58 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2020-10-09 14:14:58 +0200
commiteb6b38854f0591c853e27d41392fa0d047705eeb (patch)
treea642a1c62d3343667d33755e41090b079a234e06 /ripd
parentMerge pull request #7266 from idryzhov/isis-fixes (diff)
downloadfrr-eb6b38854f0591c853e27d41392fa0d047705eeb.tar.xz
frr-eb6b38854f0591c853e27d41392fa0d047705eeb.zip
rip(ng)d: fix interfaces cleaning
rip(ng)d_instance_disable unlinks the vrf from the instance which means that rip(ng)_interfaces_clean never works, because rip(ng)->vrf is always NULL there. This leads to the crash #6477. Clean interfaces before disabling the instance to fix the issue. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/ripd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index bcf73e8f8..389a54f22 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3422,6 +3422,8 @@ static void rip_distribute_update_all_wrapper(struct access_list *notused)
/* Delete all added rip route. */
void rip_clean(struct rip *rip)
{
+ rip_interfaces_clean(rip);
+
if (rip->enabled)
rip_instance_disable(rip);
@@ -3443,7 +3445,6 @@ void rip_clean(struct rip *rip)
route_table_finish(rip->enable_network);
vector_free(rip->passive_nondefault);
list_delete(&rip->offset_list_master);
- rip_interfaces_clean(rip);
route_table_finish(rip->distance_table);
RB_REMOVE(rip_instance_head, &rip_instances, rip);