This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 071074247b77c0bdd1ef919e62b806ede8319725 Author: Daniel P. Carvalho <[email protected]> AuthorDate: Thu Sep 10 22:32:39 2026 -0300 netutils/ptpd: fix BMCA compilation typos and define ETHERTYPE_PTP - Fix typo state->conifg -> state->config in BMCA announce check. - Fix typo state->n_identity -> state->own_identity in BMCA announce check. - Define ETHERTYPE_PTP as 0x88f7 for IEEE 802.3 Layer 2 transport. Assisted-by: Claude:claude-sonnet-5 Assisted-by: Gemini:gemini-3.8-flash-medium Signed-off-by: Daniel P. Carvalho <[email protected]> --- netutils/ptpd/ptpd.c | 2 +- netutils/ptpd/ptpv2.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/netutils/ptpd/ptpd.c b/netutils/ptpd/ptpd.c index 49c608210..375f8c00f 100644 --- a/netutils/ptpd/ptpd.c +++ b/netutils/ptpd/ptpd.c @@ -998,7 +998,7 @@ static int ptp_process_announce(FAR struct ptp_state_s *state, { clock_gettime(CLOCK_MONOTONIC, &state->last_received_announce); - if (state->conifg->bmca && is_better_clock(msg, &state->n_identity)) + if (state->config->bmca && is_better_clock(msg, &state->own_identity)) { if (!state->selected_source_valid || is_better_clock(msg, &state->selected_source)) diff --git a/netutils/ptpd/ptpv2.h b/netutils/ptpd/ptpv2.h index 3f4525428..d650ecadc 100644 --- a/netutils/ptpd/ptpv2.h +++ b/netutils/ptpd/ptpv2.h @@ -46,6 +46,12 @@ #define PTP_MULTICAST_ADDR ((in_addr_t)0xE0000181) +/* PTP over Ethernet (IEEE 802.3 / Layer 2) EtherType */ + +#ifndef ETHERTYPE_PTP +# define ETHERTYPE_PTP 0x88f7 +#endif + /* Message types */ #define PTP_MSGTYPE_MASK 0x0F
