nuttx-apps/netutils
Xiang Xiao 832e61c1c4 netutils/ptpd: Add the missing comparison in is_better_clock
The original implementation only checked if each field was less than,
but didn't check for greater than before proceeding to the next field.
This caused incorrect clock selection behavior in the PTP Best Master
Clock Algorithm (BMCA).

The fix expands each comparison to explicitly check both < and >
conditions, returning the appropriate result immediately. This ensures
proper precedence evaluation according to IEEE 1588 specification:
- gm_priority1
- gm_quality (class, accuracy, variance)
- gm_priority2
- gm_identity

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 08:51:51 -03:00
..
chat netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
cjson cmake: remove empty strings from FetchContent 2025-03-30 14:20:21 +08:00
cmux netutils/cmux: Add support for CMUX protocol 2025-10-06 15:04:22 -03:00
codecs netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
connectedhomeip netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
cwebsocket netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
dhcp6c netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
dhcpc netutils/netlib: support delete the DNS server address by index or address 2025-11-10 18:10:16 +08:00
dhcpd netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
discover netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
esp8266 netutils/esp8266: Add a function for finalization. 2025-07-22 15:04:36 +02:00
ftpc netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
ftpd netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
iperf netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
iptables netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
jsoncpp netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
libcoap netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
libcurl4nx netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
libshvc netutils/libshvc: update to correct reply head for non single element CID array 2025-10-17 14:39:16 -04:00
libulut netutils/libshvc: add Silicon Heaven integration into NuttX and SHV examples 2025-09-24 21:43:07 +08:00
libwebsockets netutils/libwebsockets: add cmake support 2025-12-25 09:43:48 +08:00
mdns apps/netutils: add mdns library support 2025-06-02 23:18:24 +08:00
mqttc apps/netutils: Modify the MQTT compilation file to enable MQTT testing 2025-12-22 11:11:59 +08:00
nanopb netutils/nanopb: fix unpack step for MACOS 2025-07-14 15:48:08 -03:00
netcat netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
netinit netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
netlib netlib: Add support for adding/removing VLAN device 2025-12-30 11:17:38 +08:00
nng netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
ntpclient ntpclient/ntpclient.c: fix the NTP client’s timeval conversion 2025-08-11 21:49:28 +08:00
paho_mqtt paho_mqtt: Add mqtt compilation files 2025-12-25 12:20:17 +08:00
ping ping: add -I for bind device 2025-12-25 12:24:04 +08:00
plcatool netutils: Add plcatool 2025-09-17 19:29:10 +08:00
pppd Revert "ppp: Fix wrong lcp_state handling on peer reconnection" 2025-11-11 14:05:47 -05:00
ptpd netutils/ptpd: Add the missing comparison in is_better_clock 2025-12-30 08:51:51 -03:00
rexec apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
rexecd netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
rtptools netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
smtp netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
telnetc Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
telnetd netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
tftpc netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
thttpd Fix Compiler warnings 2025-07-03 10:42:11 +08:00
wakaama cmake: remove empty strings from FetchContent 2025-03-30 14:20:21 +08:00
wakeonlan netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
webclient netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
webserver netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
xedge netutils/xedge: refactor Makefile to use git clone instead of zip downloads 2025-08-02 10:00:20 -03:00
xmlrpc netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
.gitignore build: Remve the unnecessary .gitignore 2020-05-23 15:56:35 +01:00
CMakeLists.txt netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
Make.defs netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
Makefile netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00