Merge pull request #1674 from csakoda/fix-VBox-getRandomIPinSubnet

Fix VirtualBox DHCPServer always uses x.x.x.1, despite getRandomIPinSubnet()
This commit is contained in:
Evan Hazlett 2015-08-28 18:29:01 -04:00
commit b8f7c3446b
1 changed files with 1 additions and 1 deletions

View File

@ -770,7 +770,7 @@ func getRandomIPinSubnet(baseIP net.IP) (net.IP, error) {
for i := 0; i < 5; i++ {
n := rand.Intn(25)
if byte(n) != nAddr[3] {
dhcpAddr = net.IPv4(nAddr[0], nAddr[1], nAddr[2], byte(1))
dhcpAddr = net.IPv4(nAddr[0], nAddr[1], nAddr[2], byte(n))
break
}
}