From 87362ceb5d493f12e8c937b533190a1996d2df22 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Sat, 27 Aug 2011 22:19:34 +0400 Subject: ospf6d: address more trivial compiler warnings * ospf6_main.c: include required headers * ospf6_asbr.h: idem * ospf6_spf.c * ospf6_spf_install(): remove unused variables --- ospf6d/ospf6_spf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ospf6d/ospf6_spf.c') diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index cb549618..beb6d7f7 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -282,8 +282,7 @@ ospf6_spf_install (struct ospf6_vertex *v, { struct ospf6_route *route; int i, j; - struct ospf6_vertex *prev, *w; - struct listnode *node, *nnode; + struct ospf6_vertex *prev; if (IS_OSPF6_DEBUG_SPF (PROCESS)) zlog_debug ("SPF install %s hops %d cost %d", -- cgit v1.2.1 From b48cebbba0dc01ad7d1fbd7cbcc39a11e1ae972d Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Wed, 14 Dec 2011 14:11:29 +0400 Subject: ospf6d: always remove the result of a previous SPF calculation This is needed to avoid stale routes in some cases; the regression was introduced by commit 1d19234e79c77a7d55194b513f2a77c6a691bc2c. * ospf6_spf.c: (ospf6_spf_calculation) Call ospf6_spf_table_finish() before possibly returning if no router-LSA is found for the root of the SPF tree. --- ospf6d/ospf6_spf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ospf6d/ospf6_spf.c') diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index beb6d7f7..a4a5b721 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -391,6 +391,8 @@ ospf6_spf_calculation (u_int32_t router_id, caddr_t lsdesc; struct ospf6_lsa *lsa; + ospf6_spf_table_finish (result_table); + /* Install the calculating router itself as the root of the SPF tree */ /* construct root vertex */ lsa = ospf6_lsdb_lookup (htons (OSPF6_LSTYPE_ROUTER), htonl (0), @@ -402,8 +404,6 @@ ospf6_spf_calculation (u_int32_t router_id, candidate_list = pqueue_create (); candidate_list->cmp = ospf6_vertex_cmp; - ospf6_spf_table_finish (result_table); - root = ospf6_vertex_create (lsa); root->area = oa; root->cost = 0; -- cgit v1.2.1