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

Add MAC address hash for non-Windows platforms #507

Merged
merged 35 commits into from
Jun 27, 2022

Conversation

vicroms
Copy link
Member

@vicroms vicroms commented Apr 14, 2022

This PR enables obtaining a MAC address hash for telemetry purposes on non-Windows platforms.

@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from 0191d51 to e8cc0d7 Compare April 14, 2022 08:11
@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from e8cc0d7 to 0c17325 Compare April 14, 2022 17:29
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

Waiting for resize-then-retry logic

@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from ae364a2 to b87c70e Compare April 15, 2022 00:19
@vicroms
Copy link
Member Author

vicroms commented Apr 15, 2022

Reminder for myself to investigate ifaddrs.h for macos

Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

I need comments on this; this code is too unsafe to take without documentation on how these interfaces are supposed to work.

@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from b3f5a63 to 9111b77 Compare April 16, 2022 01:46
@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from 9111b77 to b6f04da Compare April 16, 2022 01:53
@vicroms
Copy link
Member Author

vicroms commented Apr 18, 2022

I've added a fallback to ioctl() if getifaddrs() is not available, this should work on other systems besides macOS and Linux (BSD for example).

I don't like relying on build system detection, but it is the best we can do right now. If people don't like it I'm willing to revert the last commit. Edit: went back to system checks.

@vicroms vicroms marked this pull request as draft April 25, 2022 21:23
@vicroms vicroms marked this pull request as ready for review April 27, 2022 16:59
@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from fde9d0a to f62d003 Compare June 1, 2022 22:01
@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from cf2f5ca to 99ccd5e Compare June 2, 2022 22:20
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

Thanks for adding tests!

@BillyONeal BillyONeal requested a review from ras0219-msft June 3, 2022 18:22
Copy link
Contributor

@ras0219-msft ras0219-msft left a comment

Choose a reason for hiding this comment

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

I'd like @BillyONeal to double check my suggestions as well

@BillyONeal
Copy link
Member

Given the issues Robert found here, please double check on an actual Linux box that what you get matches a VS Code on the same machine.

Copy link
Contributor

@ras0219-msft ras0219-msft left a comment

Choose a reason for hiding this comment

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

LGTM after addressing my comments

vicroms and others added 2 commits June 23, 2022 13:48
@vicroms vicroms force-pushed the pr/fix-mac-hashes branch from 9247171 to bf8762c Compare June 23, 2022 22:43
@vicroms vicroms merged commit 57532f2 into microsoft:main Jun 27, 2022
@vicroms vicroms deleted the pr/fix-mac-hashes branch September 23, 2022 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants