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
d444b632
Commit
d444b632
authored
Jun 14, 2016
by
Davide Ciminaghi
Committed by
Alessandro Rubini
Sep 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compliance, 9.5.2.2: ignore messages received from same port that sent them
parent
c4868336
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
msg.c
proto-standard/msg.c
+5
-8
No files found.
proto-standard/msg.c
View file @
d444b632
...
...
@@ -55,15 +55,12 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
return
-
1
;
/*
* If the message is from us, we should discard it.
* The best way to do that is comparing the mac address,
* but it's easier to check the clock identity (we refuse
* any port, not only the same port, as we can't sync with
* ourself even when we'll run in multi-port mode.
* If the message is from the same port that sent it, we should
* discard it (9.5.2.2)
*/
if
(
!
memcmp
(
&
ppi
->
received_ptp_header
.
sourcePortIdentity
.
clockIdentity
,
&
DSPOR
(
ppi
)
->
portIdentity
.
clock
Identity
,
PP_CLOCK_IDENTITY_LENGTH
))
if
(
!
memcmp
(
&
ppi
->
received_ptp_header
.
sourcePortIdentity
,
&
DSPOR
(
ppi
)
->
port
Identity
,
sizeof
(
PortIdentity
)
))
return
-
1
;
/*
...
...
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