Revert "net: gptp: Fix announce message len"

This reverts commit 6b644dff67.

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 <mario.paja@zal.aero>
This commit is contained in:
Mario Paja 2023-12-19 12:16:49 +01:00 committed by Fabio Baltieri
parent a5e5c1d00a
commit 98336b2811

View file

@ -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)))