-
Notifications
You must be signed in to change notification settings - Fork 18k
net: TestInterfaceHardwareAddrWithGetmac fails on Windows 10 when using virtual adapters #21027
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
Comments
The test is for function The test creates the expected output by running
Note how two of the adapters have the same Physical Address. OTOH,
Note how all physical addresses are unique. Consistent with that,
The test skips the loopback interface.
In other words, net.Interfaces returns Maybe someone familiar with Windows networking could clarify what For reference, the actual adapters on my system (as shown in Windows control panel) are:
|
Looks like this is a bug of TestInterfaceHardwareAddrWithGetmac. There's no guarantee that link-layer identifiers/addresses are unique in node-local scope. They are just unique in each link-local scope. |
Thank you. I will adjust the test to ignore interfaces with duplicate MAC addresses when I get home in August. Unless someone bits me to it. Alex |
@pkch can you, please, try https://go-review.googlesource.com/59411 to see if it fixes your problem? Thank you. Alex |
Change https://golang.org/cl/59411 mentions this issue: |
Change https://golang.org/cl/82975 mentions this issue: |
Re-work the test to use wmic instead of PowerShell's getmac that's only avaliable on Server 2008. Maintains duplicate detection added for #21027. Tested on windows-amd64-{2008, 2012, 2016} buildlets. Enabling for Windows XP because it should work[1]. Fixes #20073 [1] https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic_overview.mspx?mfr=true Change-Id: Ic11d569f7964f61d08ae0dcc1b926efc5336ac5b Reviewed-on: https://go-review.googlesource.com/82975 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Running
all.bat
on Windows 10 after checking out source from master and disabling cgo (set CGO_ENABLED=0
) due to issues with gcc. Go compiled fine, but the tests failed with:My "Ethernet 2" adapter is not a real ethernet (I have none), it's a virtual adapter installed with some VPN. Its type is listed as [TAP-Windows Adapter V9[(https://www.iocreed.net/what-is-tap-windows-adapter-and-how-to-remove-it/), and it's apparently required to use OpenVPN.
The text was updated successfully, but these errors were encountered: