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
c4895a90
Commit
c4895a90
authored
Jul 28, 2014
by
Matthieu Boutier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse source-specific request.
parent
45d1b798
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
message.c
message.c
+39
-0
No files found.
message.c
View file @
c4895a90
...
@@ -673,6 +673,45 @@ parse_packet(const unsigned char *from, struct interface *ifp,
...
@@ -673,6 +673,45 @@ parse_packet(const unsigned char *from, struct interface *ifp,
update_route
(
router_id
,
prefix
,
plen
,
src_prefix
,
src_plen
,
update_route
(
router_id
,
prefix
,
plen
,
src_prefix
,
src_plen
,
seqno
,
metric
,
interval
,
neigh
,
nh
,
seqno
,
metric
,
interval
,
neigh
,
nh
,
channels
,
channels_len
(
channels
));
channels
,
channels_len
(
channels
));
}
else
if
(
type
==
MESSAGE_REQUEST_SRC_SPECIFIC
)
{
unsigned
char
prefix
[
16
],
plen
,
ae
,
src_prefix
[
16
],
src_plen
;
int
rc
,
parsed
=
5
;
if
(
len
<
3
)
goto
fail
;
ae
=
message
[
2
];
plen
=
message
[
3
];
src_plen
=
message
[
4
];
rc
=
network_prefix
(
ae
,
plen
,
0
,
message
+
parsed
,
NULL
,
len
+
2
-
parsed
,
prefix
);
if
(
rc
<
0
)
goto
fail
;
if
(
ae
==
1
)
plen
+=
96
;
parsed
+=
rc
;
rc
=
network_prefix
(
ae
,
src_plen
,
0
,
message
+
parsed
,
NULL
,
len
+
2
-
parsed
,
src_prefix
);
if
(
rc
<
0
)
goto
fail
;
if
(
ae
==
1
)
src_plen
+=
96
;
parsed
+=
rc
;
if
(
ae
==
0
)
{
debugf
(
"Received request for any from %s on %s.
\n
"
,
format_address
(
from
),
ifp
->
name
);
/* If a neighbour is requesting a full route dump from us,
we might as well send it an IHU. */
send_ihu
(
neigh
,
NULL
);
/* Since nodes send wildcard requests on boot, booting
a large number of nodes at the same time may cause an
update storm. Ignore a wildcard request that happens
shortly after we sent a full update. */
if
(
neigh
->
ifp
->
last_update_time
<
now
.
tv_sec
-
MAX
(
neigh
->
ifp
->
hello_interval
/
100
,
1
))
send_update
(
neigh
->
ifp
,
0
,
NULL
,
0
,
NULL
,
0
);
}
else
{
debugf
(
"Received request for (%s from %s) from %s on %s.
\n
"
,
format_prefix
(
prefix
,
plen
),
format_prefix
(
src_prefix
,
src_plen
),
format_address
(
from
),
ifp
->
name
);
send_update
(
neigh
->
ifp
,
0
,
prefix
,
plen
,
src_prefix
,
src_plen
);
}
}
else
{
}
else
{
debugf
(
"Received unknown packet type %d from %s on %s.
\n
"
,
debugf
(
"Received unknown packet type %d from %s on %s.
\n
"
,
type
,
format_address
(
from
),
ifp
->
name
);
type
,
format_address
(
from
),
ifp
->
name
);
...
...
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