Skip to content

Commit

Permalink
Revert "net: gptp: Fix announce message len"
Browse files Browse the repository at this point in the history
This reverts commit 6b644df.

Reason: breaks Peer-to-Peer gPTP connection. A better solution should be
found to handle the optional TLV on the announce message (chapter 10.5.1
IEEE 802.1AS-2011)

Signed-off-by: Mario Paja <[email protected]>
  • Loading branch information
Mario Paja authored and fabiobaltieri committed Dec 19, 2023
1 parent a5e5c1d commit 98336b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/l2/ethernet/gptp/gptp_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern "C" {
#define GPTP_ANNOUNCE_LEN(pkt) \
(sizeof(struct gptp_hdr) + sizeof(struct gptp_announce) \
+ ntohs(GPTP_ANNOUNCE(pkt)->tlv.len) \
- sizeof(struct gptp_path_trace_tlv))
- sizeof(struct gptp_path_trace_tlv) + 4)

#define GPTP_CHECK_LEN(pkt, len) \
((GPTP_PACKET_LEN(pkt) != len) && (GPTP_VALID_LEN(pkt, len)))
Expand Down

0 comments on commit 98336b2

Please sign in to comment.