Files
Jens van Almsick d3069760d7 [OS Detection] Don't classify MacOS sequences as Windows when cnt_02 >= 2 (#26303)
fix(os_detection): don't classify macOS sequences as Windows

macOS 26.x (ChibiOS) can send a late wLength=0x04 packet after the two
0xFF packets that already established OS_MACOS. The Windows check
(cnt_ff >= 2 && cnt_04 >= 1) fired on this combination and overwrites
the correct result.

Real-world Windows sequences always start with 0xFF packets (cnt_02 = 0);
macOS sequences always open with at least two 0x02 packets (cnt_02 >= 2).
Adding && setups_data.cnt_02 < 2 to the Windows condition is sufficient
to separate the two populations without affecting any existing detection.

Adds a regression test for the affected sequence.
2026-09-25 19:05:33 +01:00
..