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
dd47d361
Commit
dd47d361
authored
May 24, 2017
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update handling of sub-TLVs to comply with latest spec.
parent
9a6c3ce8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
message.c
message.c
+6
-6
No files found.
message.c
View file @
dd47d361
...
...
@@ -483,13 +483,13 @@ parse_packet(const unsigned char *from, struct interface *ifp,
have_router_id
=
0
;
goto
fail
;
}
rc
=
parse_other_subtlv
(
message
+
12
,
len
-
10
);
if
(
rc
<
0
)
goto
done
;
memcpy
(
router_id
,
message
+
4
,
8
);
have_router_id
=
1
;
debugf
(
"Received router-id %s from %s on %s.
\n
"
,
format_eui64
(
router_id
),
format_address
(
from
),
ifp
->
name
);
rc
=
parse_other_subtlv
(
message
+
12
,
len
-
10
);
if
(
rc
<
0
)
goto
done
;
}
else
if
(
type
==
MESSAGE_NH
)
{
unsigned
char
nh
[
16
];
int
rc
;
...
...
@@ -508,9 +508,6 @@ parse_packet(const unsigned char *from, struct interface *ifp,
debugf
(
"Received nh %s (%d) from %s on %s.
\n
"
,
format_address
(
nh
),
message
[
2
],
format_address
(
from
),
ifp
->
name
);
rc
=
parse_other_subtlv
(
message
+
4
+
rc
,
len
-
2
-
rc
);
if
(
rc
<
0
)
goto
done
;
if
(
message
[
2
]
==
1
)
{
memcpy
(
v4_nh
,
nh
,
16
);
have_v4_nh
=
1
;
...
...
@@ -518,6 +515,9 @@ parse_packet(const unsigned char *from, struct interface *ifp,
memcpy
(
v6_nh
,
nh
,
16
);
have_v6_nh
=
1
;
}
rc
=
parse_other_subtlv
(
message
+
4
+
rc
,
len
-
2
-
rc
);
if
(
rc
<
0
)
goto
done
;
}
else
if
(
type
==
MESSAGE_UPDATE
)
{
unsigned
char
prefix
[
16
],
src_prefix
[
16
],
*
nh
;
unsigned
char
plen
,
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