Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net: IPNet missing network mask on Windows #12811
Go 1.5.1 on Windows the
The current code uses the
This will only work on Widows Vista/Windows2008 and above. For Windows XP/Windows 2003 you need to implement the following C code in Go to get the correct prefix length (network mask):
I'll leave this exercise up to the Go guys.
I found another issue: The
This will exclude inactive interfaces.
The network mask code looks good, but I don't have a Windows XP image to test the first prefix code. However, you left out a way to filter out the non active interfaces. See #12812
I think it would be best to merge the fix for this issue (12811) with 12812. Then test and release them together as part of Go 1.6.
It is not regression from go1.4. It was introduced by CL 3024, which is part of go1.5.
I have Windows XP computer. I visually checked my new netmasks looks good.
I disagee. These bugs are not related in any ways. It will be much easier (and quicker) to have 2 simple fixes approved, then 1 combined - bigger and more complicated. Both fixes can go into go1.6 (if they make deadline).
Several months ago I combined the two "fixes" in my code to get the desired functionality for my application. However, since you are the Go expert, you would know better than I what is the best way to bring this to general availability.
I found issue 12812 because my laptop has WiFi, 1000base-T, and several VPN connections as shown in the image below. All of the interfaces that have an X are not active but show up in
I can send you the code for my "fix" if you like, but if you are separating the solutions, it might not do you much good.
Use windows netsh command to verify interface addresses and netmasks net package returns. The test is to be enabled once issue #12811 is fixed. Updates #12811 Change-Id: I191e350a1403e5133791d4ec59561fefa24f5c61 Reviewed-on: https://go-review.googlesource.com/17478 Reviewed-by: Mikio Hara <email@example.com> Run-TryBot: Mikio Hara <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>