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
45d1b798
Commit
45d1b798
authored
Jul 28, 2014
by
Matthieu Boutier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make handle_request deal with source prefixes.
parent
358ae9f3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
message.c
message.c
+9
-7
message.h
message.h
+3
-1
No files found.
message.c
View file @
45d1b798
...
...
@@ -584,7 +584,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
format_prefix
(
prefix
,
plen
),
format_address
(
from
),
ifp
->
name
,
format_eui64
(
message
+
8
),
seqno
);
handle_request
(
neigh
,
prefix
,
plen
,
message
[
6
],
handle_request
(
neigh
,
prefix
,
plen
,
zeroes
,
0
,
message
[
6
],
seqno
,
message
+
8
);
}
else
if
(
type
==
MESSAGE_UPDATE_SRC_SPECIFIC
)
{
unsigned
char
prefix
[
16
],
src_prefix
[
16
],
*
nh
;
...
...
@@ -1914,15 +1914,17 @@ send_request_resend(struct neighbour *neigh,
void
handle_request
(
struct
neighbour
*
neigh
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
unsigned
char
hop_count
,
unsigned
char
plen
,
const
unsigned
char
*
src_prefix
,
unsigned
char
src_plen
,
unsigned
char
hop_count
,
unsigned
short
seqno
,
const
unsigned
char
*
id
)
{
struct
xroute
*
xroute
;
struct
babel_route
*
route
;
struct
neighbour
*
successor
=
NULL
;
xroute
=
find_xroute
(
prefix
,
plen
,
zeroes
,
0
);
route
=
find_installed_route
(
prefix
,
plen
,
zeroes
,
0
);
xroute
=
find_xroute
(
prefix
,
plen
,
src_prefix
,
src_plen
);
route
=
find_installed_route
(
prefix
,
plen
,
src_prefix
,
src_plen
);
if
(
xroute
&&
(
!
route
||
xroute
->
metric
<=
kernel_metric
))
{
if
(
hop_count
>
0
&&
memcmp
(
id
,
myid
,
8
)
==
0
)
{
...
...
@@ -1968,7 +1970,7 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix,
find a different neighbour to forward the request to. */
struct
babel_route
*
other_route
;
other_route
=
find_best_route
(
prefix
,
plen
,
zeroes
,
0
,
other_route
=
find_best_route
(
prefix
,
plen
,
src_prefix
,
src_plen
,
0
,
neigh
);
if
(
other_route
&&
route_metric
(
other_route
)
<
INFINITY
)
successor
=
other_route
->
neigh
;
...
...
@@ -1978,8 +1980,8 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix,
/* Give up */
return
;
send_unicast_multihop_request
(
successor
,
prefix
,
plen
,
zeroes
,
0
,
send_unicast_multihop_request
(
successor
,
prefix
,
plen
,
src_prefix
,
src_plen
,
seqno
,
id
,
hop_count
-
1
);
record_resend
(
RESEND_REQUEST
,
prefix
,
plen
,
zeroes
,
0
,
seqno
,
id
,
record_resend
(
RESEND_REQUEST
,
prefix
,
plen
,
src_prefix
,
src_plen
,
seqno
,
id
,
neigh
->
ifp
,
0
);
}
message.h
View file @
45d1b798
...
...
@@ -108,5 +108,7 @@ void send_request_resend(struct neighbour *neigh,
unsigned
char
src_plen
,
unsigned
short
seqno
,
unsigned
char
*
id
);
void
handle_request
(
struct
neighbour
*
neigh
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
unsigned
char
hop_count
,
unsigned
char
plen
,
const
unsigned
char
*
src_prefix
,
unsigned
char
src_plen
,
unsigned
char
hop_count
,
unsigned
short
seqno
,
const
unsigned
char
*
id
);
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