Avnu / OpenAvnu

OpenAvnu - an Avnu sponsored repository for Time Sensitive Network (TSN and AVB) technology
468 stars 289 forks source link

gPTP: Bug mempcy for 'grandmasterIdentity' #854

Open inchoel opened 5 years ago

inchoel commented 5 years ago

https://github.com/rroussel/OpenAvnu/tree/ArtAndLogic-aPTP-changes/daemons/gptp

diff --git a/daemons/gptp/common/ptp_message.cpp b/daemons/gptp/common/ptp_message.cpp index bc5b0e0..4406383 100644 --- a/daemons/gptp/common/ptp_message.cpp +++ b/daemons/gptp/common/ptp_message.cpp @@ -885,7 +885,7 @@ std::shared_ptr buildPTPMessage PTP_ANNOUNCE_GRANDMASTER_PRIORITY2 (PTP_ANNOUNCE_OFFSET), sizeof(annc->grandmasterPriority2)); / - memcpy(&(annc->grandmasterIdentity), // <-- have to remove '&' / + memcpy((annc->grandmasterIdentity), buf + PTP_ANNOUNCE_GRANDMASTER_IDENTITY (PTP_ANNOUNCE_OFFSET),

andrew-elder commented 5 years ago

@inchoel - good catch. Do you want to submit a pull request to the ArtAndLogic-aPTP-changes branch?

inchoel commented 5 years ago

@andrew-elder Yes, I want to Thank you.

inchoel commented 5 years ago

@andrew-elder , @rrousselArtLogic I created a pull request for this. https://github.com/rroussel/OpenAvnu/pull/2