Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OS Detection] Improve MacOS detection #24708

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

drashna
Copy link
Member

@drashna drashna commented Dec 12, 2024

Description

Fix detection for macOS by making the detection more flexible.

Types of Changes

  • Core
  • Bugfix

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@drashna drashna requested a review from a team December 12, 2024 03:06
@@ -133,7 +133,7 @@ void process_wlength(const uint16_t w_length) {
} else if (setups_data.count == setups_data.cnt_ff) {
// Linux has 3 packets with 0xFF.
guessed = OS_LINUX;
} else if (setups_data.count == 5 && setups_data.last_wlength == 0xFF && setups_data.cnt_ff == 1 && setups_data.cnt_02 == 2) {
} else if (setups_data.count >= 5 && setups_data.last_wlength == 0xFF && setups_data.cnt_ff >= 1 && setups_data.cnt_02 >= 2) {
Copy link
Member

@zvecr zvecr Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Some collected sequences of wLength can be found in tests.

Any chance we can collect a sample of the "new" macos behaviour and update tests so they pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] detected_host_os() not detecting MacOS
2 participants