From 0ea8fb4abe5acad0b8f470bbdc5cc929b6a58ced Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sat, 24 Apr 2010 15:18:21 +0200 Subject: Fixes and enhancements in 'show ospf state' command. Now it shows a distance, option to change showing reachable/all network nodes and better handling of AS-external LSAs in multiple areas. The command 'show ospf topology' was changed to not show stubnets in both OSPFv2 and OSPFv3 (previously it displayed stubnets in OSPFv2). --- proto/ospf/rt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'proto/ospf/rt.c') diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index d685961..9e63d2c 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -681,6 +681,10 @@ ospf_rt_sum(struct ospf_area *oa) if (!(abr->n.options & ORTA_ABR)) continue; + /* This check is not mentioned in RFC 2328 */ + if (abr->n.type != RTS_OSPF) + continue; + /* 16.2. (5) */ orta nf = { .type = RTS_OSPF_IA, @@ -966,6 +970,9 @@ ospf_ext_spf(struct proto_ospf *po) nfa.metric2 = LSINFINITY; } + /* Mark the LSA as reachable */ + en->color = INSPF; + /* Whether the route is preferred in route selection according to 16.4.1 */ nfa.options = epath_preferred(&nf2->n) ? ORTA_PREF : 0; @@ -1046,8 +1053,6 @@ ospf_rt_spf(struct proto_ospf *po) if (po->areano == 0) return; - po->cleanup = 1; - OSPF_TRACE(D_EVENTS, "Starting routing table calculation"); /* 16. (1) - Invalidate old routing table */ -- cgit v1.2.3