-
-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to comments and tests
Description
Fix detection for macOS by making the detection more flexible.
Types of Changes
Issues Fixed or Closed by This PR
Checklist