-
Notifications
You must be signed in to change notification settings - Fork 26
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
get_mac_address() returns None by default when connected to corporate VPN #91
Comments
Hey Igor, thanks for the report. Apologies for the delay in responding, life continues to be zany 😅 Global Protect messes with the OS routing table to ensure all traffic flows through the VPN. How this happens in practice varies by platform, but generally it involves changing the default route. How getmac works if you call it it with no args is it attempts to lookup the default interface on the system (in this case, it should be getting There are several things that would cause this to fail:
Not sure if I'll be able to reproduce, since while I do have a system with Global Protect, it's Windows. I'll give it a try anyway next week when I have access to it again. Next steps:
getmac -v -dddd -i utun0
getmac -v -dddd
getmac -v -dddd en0 The |
Hey no worries! Thanks for getting back to me! So I think the issue is that indeed |
Describe the bug
When running the
get_mac_address()
not connected to VPN, everything works. However, when connected to my corporate VPN (via GlobalProtect), the response is None.To Reproduce
get_mac_address()
orrun getmac -v --debug
Expected behavior
MAC address of default networking device
System info
(please complete the following information):
Additional context
Output with verbose logging:
When specifying an interface I do get a result even with VPN:
I'd like to figure out how to get the MAC address without specifying a network interface as I am using a 3rd party library that uses this pattern, and I do not have access to modify their code. (I also need it to run on a variety of runtimes).
The text was updated successfully, but these errors were encountered: