Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
9e48d717
Commit
9e48d717
authored
May 03, 2000
by
Ondřej Filip
Browse files
Test for "flushing" added.
parent
a02c6c18
Changes
2
Hide whitespace changes
Inline
Side-by-side
proto/ospf/rt.c
View file @
9e48d717
...
...
@@ -30,14 +30,14 @@ ospf_rt_spfa(struct ospf_area *oa)
int
age
=
0
,
flush
=
0
;
struct
proto
*
p
=&
oa
->
po
->
proto
;
/* FIXME if I'm not in LOADING or EXCHANGE set flush=1 */
flush
=
can_flush_lsa
(
oa
);
if
((
delta
=
now
-
oa
->
lage
)
>=
AGINGDELTA
)
{
oa
->
lage
=
now
;
age
=
1
;
}
WALK_SLIST_DELSAFE
(
SNODE
en
,
nx
,
oa
->
lsal
)
/* FIXME Make it DELSAFE */
WALK_SLIST_DELSAFE
(
SNODE
en
,
nx
,
oa
->
lsal
)
{
en
->
color
=
OUTSPF
;
en
->
dist
=
LSINFINITY
;
...
...
proto/ospf/topology.c
View file @
9e48d717
...
...
@@ -159,7 +159,7 @@ age_timer_hook(timer *timer)
struct
top_hash_entry
*
en
,
*
nxt
;
int
flush
=
0
;
/* FIXME Fill flush! */
flush
=
can_flush_lsa
(
oa
);
if
((
delta
=
now
-
oa
->
lage
)
>=
AGINGDELTA
)
{
...
...
@@ -515,7 +515,6 @@ can_flush_lsa(struct ospf_area *oa)
struct
ospf_iface
*
ifa
;
struct
ospf_neighbor
*
n
;
struct
proto_ospf
*
po
=
oa
->
po
;
int
flush
=
1
;
WALK_LIST
(
ifa
,
iface_list
)
{
...
...
@@ -523,14 +522,13 @@ can_flush_lsa(struct ospf_area *oa)
{
WALK_LIST
(
n
,
ifa
->
neigh_list
)
{
if
(
n
->
state
==
NEIGHBOR_EXCHANGE
||
n
->
state
==
NEIGHBOR_LOADING
)
if
(
(
n
->
state
==
NEIGHBOR_EXCHANGE
)
||
(
n
->
state
==
NEIGHBOR_LOADING
)
)
{
flush
=
0
;
break
;
return
0
;
}
}
}
}
return
flush
;
return
1
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment