summaryrefslogtreecommitdiff
path: root/daemons/gptp/common/ptp_message.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/gptp/common/ptp_message.cpp')
-rw-r--r--daemons/gptp/common/ptp_message.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/daemons/gptp/common/ptp_message.cpp b/daemons/gptp/common/ptp_message.cpp
index ded34b1e..6d0204d1 100644
--- a/daemons/gptp/common/ptp_message.cpp
+++ b/daemons/gptp/common/ptp_message.cpp
@@ -1360,6 +1360,22 @@ void PTPMessagePathDelayRespFollowUp::processMessage(IEEE1588Port * port)
req->getPortIdentity(&req_id);
resp->getRequestingPortIdentity(&resp_id);
+ /*We need to keep track of lost respFUPs. If we have more
+ * than a certain number of lost FUPs we should set asCapable
+ * to false
+ */
+ if( sequenceId != (port->getLastSeqId() + 1) )
+ {
+ XPTPD_ERROR("Current seqID: %d. %d are missing since the last one sent",
+ sequenceId, sequenceId-port->getLastSeqId());
+ if( (sequenceId - port->getLastSeqId() ) > port->getLostPdelayRespThresh() )
+ {
+ port->setAsCapable( false );
+ }
+ }
+ port->setLastSeqID(sequenceId);
+
+
// Check if we have received a response
/* Count wrong seqIDs and after a threshold (from .ini), mark
* gPTP as not asCapable