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
aaa1944e
Commit
aaa1944e
authored
Mar 11, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tweaks to request forwarding.
parent
3072bce2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
message.c
message.c
+10
-3
No files found.
message.c
View file @
aaa1944e
...
...
@@ -251,7 +251,7 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix,
unsigned
short
seqno
,
unsigned
short
router_hash
)
{
struct
xroute
*
xroute
;
struct
route
*
route
;
struct
route
*
route
,
*
best_route
;
if
(
hop_count
==
0
)
{
send_update
(
neigh
->
network
,
1
,
prefix
,
plen
);
...
...
@@ -266,9 +266,16 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix,
return
;
}
/* We usually want to send the request to our selected successor,
but avoid it if we suspect it's dead. So pick the best successor
(feasible of not) if our selected successor's metric is too large. */
route
=
find_installed_route
(
prefix
,
plen
);
if
(
!
route
||
route
->
metric
>=
INFINITY
||
route
->
neigh
==
neigh
)
route
=
find_best_route
(
prefix
,
plen
,
0
,
neigh
);
best_route
=
find_best_route
(
prefix
,
plen
,
0
,
neigh
);
if
(
!
route
||
route
->
neigh
==
neigh
||
route
->
metric
==
INFINITY
)
route
=
best_route
;
else
if
(
route
&&
best_route
&&
route
->
metric
>=
best_route
->
metric
+
256
)
route
=
best_route
;
if
(
!
route
||
route
->
metric
>=
INFINITY
||
route
->
neigh
==
neigh
)
return
;
if
(
router_hash
==
hash_id
(
route
->
src
->
address
)
&&
...
...
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