forked from richardcochran/linuxptp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sad: introduce sad_set_last_seqid() and sad_check_seqid()
The standard specifies that the header sequence id should be checked to confirm the message has not been replayed. It specifies a seqid check for each message that has it's own sequence id pool but this is most relevant for sync/followup messages for which slaves do not confirm seqid currently. The standard also mentioned a seqid window. The seqid window specifies how far the seqid can advance from the last know seqid before it is considered a replay attack from before a seqid rollover. This patch introduces sad_check_seqid() in sad.c to check the seqid and sad_set_last_seqid() which is updates the last seqid upon successful sync in port_synchronize() and reset upon state transition in port_e2e_transition() and port_p2p_transition. Signed-off-by: Clay Kaiser <Clay.Kaiser@ibm.com> Reviewed-by: Erez Geva <ErezGeva2@gmail.com> Reviewed-by: Miroslav Lichvar <mlichvar@redhat.com>
- Loading branch information
1 parent
60980bb
commit e2e3aa0
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters