29 lines
862 B
Diff
29 lines
862 B
Diff
|
From 57e4c21583a9fa4c9d34fa8263930c3a1d5c6cd9 Mon Sep 17 00:00:00 2001
|
||
|
From: Igor Ryzhov <iryzhov@nfware.com>
|
||
|
Date: Tue, 31 Aug 2021 13:41:40 +0300
|
||
|
Subject: [PATCH] ospfd: correctly cleanup spf data
|
||
|
|
||
|
ospf_spf_cleanup frees the data so we need to reset the stale pointers.
|
||
|
|
||
|
Fixes #9523.
|
||
|
|
||
|
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
||
|
---
|
||
|
ospfd/ospf_spf.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
|
||
|
index 6a51440266e..8b4d55984c8 100644
|
||
|
--- a/ospfd/ospf_spf.c
|
||
|
+++ b/ospfd/ospf_spf.c
|
||
|
@@ -1781,6 +1781,9 @@ void ospf_spf_calculate_area(struct ospf *ospf, struct ospf_area *area,
|
||
|
ospf->ti_lfa_protection_type);
|
||
|
|
||
|
ospf_spf_cleanup(area->spf, area->spf_vertex_list);
|
||
|
+
|
||
|
+ area->spf = NULL;
|
||
|
+ area->spf_vertex_list = NULL;
|
||
|
}
|
||
|
|
||
|
void ospf_spf_calculate_areas(struct ospf *ospf, struct route_table *new_table,
|