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
f9562668
Commit
f9562668
authored
Mar 11, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't avoid fresh routes in route selection.
parent
8b6dabf7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
16 deletions
+3
-16
route.c
route.c
+3
-16
No files found.
route.c
View file @
f9562668
...
@@ -240,8 +240,7 @@ update_feasible(const unsigned char *a,
...
@@ -240,8 +240,7 @@ update_feasible(const unsigned char *a,
(
src
->
seqno
==
seqno
&&
refmetric
<
src
->
metric
));
(
src
->
seqno
==
seqno
&&
refmetric
<
src
->
metric
));
}
}
/* This returns a feasible route. The only condition it must satisfy if that
/* This returns the feasible route with the smallest metric. */
if there is a feasible route, then one will be found. */
struct
route
*
struct
route
*
find_best_route
(
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
find_best_route
(
const
unsigned
char
*
prefix
,
unsigned
char
plen
)
{
{
...
@@ -255,16 +254,8 @@ find_best_route(const unsigned char *prefix, unsigned char plen)
...
@@ -255,16 +254,8 @@ find_best_route(const unsigned char *prefix, unsigned char plen)
continue
;
continue
;
if
(
!
route_feasible
(
&
routes
[
i
]))
if
(
!
route_feasible
(
&
routes
[
i
]))
continue
;
continue
;
if
(
route
&&
route
->
metric
<
INFINITY
&&
if
(
route
&&
route
->
metric
<=
routes
[
i
].
metric
)
route
->
metric
+
512
>=
routes
[
i
].
metric
)
{
if
(
route
->
origtime
<=
now
.
tv_sec
-
30
&&
routes
[
i
].
origtime
>=
now
.
tv_sec
-
30
)
continue
;
continue
;
if
(
route
->
metric
<
routes
[
i
].
metric
)
continue
;
if
(
route
->
origtime
>
routes
[
i
].
origtime
)
continue
;
}
route
=
&
routes
[
i
];
route
=
&
routes
[
i
];
}
}
return
route
;
return
route
;
...
@@ -462,10 +453,6 @@ consider_route(struct route *route)
...
@@ -462,10 +453,6 @@ consider_route(struct route *route)
if
(
installed
->
metric
>=
route
->
metric
+
288
)
if
(
installed
->
metric
>=
route
->
metric
+
288
)
goto
install
;
goto
install
;
/* Avoid routes that haven't been around for some time */
if
(
route
->
origtime
>=
now
.
tv_sec
-
30
)
return
;
if
(
installed
->
metric
>=
route
->
metric
+
192
)
if
(
installed
->
metric
>=
route
->
metric
+
192
)
goto
install
;
goto
install
;
...
...
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