Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
5217805a
Commit
5217805a
authored
Jun 12, 2016
by
Davide Ciminaghi
Committed by
Alessandro Rubini
Sep 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compliance, 9.5.1: discard messages not coming from our domain
parent
2996dd7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
msg.c
proto-standard/msg.c
+9
-0
No files found.
proto-standard/msg.c
View file @
5217805a
...
@@ -36,6 +36,15 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
...
@@ -36,6 +36,15 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
hdr
->
controlField
=
(
*
(
UInteger8
*
)
(
buf
+
32
));
hdr
->
controlField
=
(
*
(
UInteger8
*
)
(
buf
+
32
));
hdr
->
logMessageInterval
=
(
*
(
Integer8
*
)
(
buf
+
33
));
hdr
->
logMessageInterval
=
(
*
(
Integer8
*
)
(
buf
+
33
));
/*
* 9.5.1:
* Only PTP messages where the domainNumber field of the PTP message
* header (see 13.3.2.5) is identical to the defaultDS.domainNumber
* shall be accepted for processing by the protocol.
*/
if
(
hdr
->
domainNumber
!=
GDSDEF
(
GLBS
(
ppi
))
->
domainNumber
)
return
-
1
;
/*
/*
* If the message is from us, we should discard it.
* If the message is from us, we should discard it.
* The best way to do that is comparing the mac address,
* The best way to do that is comparing the mac 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