diff options
author | Ondrej Filip <feela@network.cz> | 2004-06-06 19:03:56 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-06-06 19:03:56 +0200 |
commit | cd09226078471cf9a2db4e755fbd5f6f137137c9 (patch) | |
tree | fd9a702b53b34d0fec97f86fca9bdd275e6ef3b6 /proto | |
parent | 933bfdde2a0bc4e31e74a3f9e03174b0287c03fb (diff) | |
download | bird-cd09226078471cf9a2db4e755fbd5f6f137137c9.tar bird-cd09226078471cf9a2db4e755fbd5f6f137137c9.zip |
Be sure, that ospf_area is aged before routing table calculation.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/ospf/lsalib.c | 2 | ||||
-rw-r--r-- | proto/ospf/rt.c | 3 | ||||
-rw-r--r-- | proto/ospf/topology.c | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index 80649f5..fcf23fc 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -49,7 +49,7 @@ ospf_age(struct ospf_area *oa) WALK_SLIST_DELSAFE(en, nxt, oa->lsal) { - if (po->calcrt) + if (oa->rt && (oa->rt->dist != LSINFINITY)) { en->color = OUTSPF; en->dist = LSINFINITY; diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index cbd53f6..78eb802 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -69,6 +69,9 @@ ospf_rt_spfa(struct ospf_area *oa) if (oa->rt == NULL) return; + if (oa->rt->dist != LSINFINITY) + ospf_age(oa); + FIB_WALK(in, nftmp) { nf = (struct infib *) nftmp; diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 6a6eb01..75e074a 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -201,6 +201,7 @@ originate_rt_lsa(struct ospf_area *oa) lsasum_calculate(&lsa, body, po); en = lsa_install_new(&lsa, body, oa); oa->rt = en; + en->dist = 0; /* Force area aging */ ospf_lsupd_flood(NULL, NULL, &oa->rt->lsa, NULL, oa, 1); schedule_rtcalc(po); oa->origrt = 0; |