Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
757d5e1e
Commit
757d5e1e
authored
Oct 23, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rework and simplify send_triggered_update.
Triggered updates are no longer sent when a route gets better.
parent
5742abbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
route.c
route.c
+20
-16
No files found.
route.c
View file @
757d5e1e
...
...
@@ -521,8 +521,9 @@ void
send_triggered_update
(
struct
route
*
route
,
struct
source
*
oldsrc
,
unsigned
oldmetric
)
{
int
urgent
=
0
;
unsigned
newmetric
,
diff
;
/* 1 means send speedily, 2 means resend */
int
urgent
;
if
(
!
route
->
installed
)
return
;
...
...
@@ -533,24 +534,27 @@ send_triggered_update(struct route *route, struct source *oldsrc,
if
(
route
->
src
!=
oldsrc
||
(
oldmetric
<
INFINITY
&&
newmetric
>=
INFINITY
))
/* Switching sources can cause transient routing loops.
Retractions
are always urgent
. */
Retractions
can cause blackholes
. */
urgent
=
2
;
else
if
(
newmetric
>=
6
*
256
&&
oldmetric
>=
6
*
256
)
/* Don't be noisy about far-away nodes */
urgent
=
-
1
;
else
if
(
diff
>=
512
)
else
if
(
newmetric
>
oldmetric
&&
oldmetric
<
6
*
256
&&
diff
>=
512
)
/* Route getting significantly worse */
urgent
=
1
;
/* Make sure that requests are satisfied speedily */
if
(
urgent
<
1
)
{
if
(
unsatisfied_request
(
route
->
src
->
prefix
,
route
->
src
->
plen
,
route
->
seqno
,
route
->
src
->
id
))
urgent
=
1
;
}
if
(
urgent
<
0
||
(
!
urgent
&&
diff
<
384
))
/* Never mind. */
else
if
(
unsatisfied_request
(
route
->
src
->
prefix
,
route
->
src
->
plen
,
route
->
seqno
,
route
->
src
->
id
))
/* Make sure that requests are satisfied speedily */
urgent
=
1
;
else
if
(
oldmetric
>=
INFINITY
&&
newmetric
<
INFINITY
)
/* New route */
urgent
=
0
;
else
if
(
newmetric
<
oldmetric
&&
diff
<
1024
)
/* Route getting better. This may be a transient fluctuation, so
don't advertise it to avoid making routes unfeasible later on. */
return
;
else
if
(
diff
<
384
)
/* Don't fret about trivialities */
return
;
else
urgent
=
0
;
if
(
urgent
>=
2
)
send_update_resend
(
NULL
,
route
->
src
->
prefix
,
route
->
src
->
plen
);
...
...
Write
Preview
Markdown
is supported
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