Skip to content

Commit

Permalink
Iterate through entire subent range when creating leases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaley committed Nov 22, 2016
1 parent 2c94e06 commit a6659e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipam/subnets.go
Expand Up @@ -48,7 +48,7 @@ func (ipam *Ipam) CreateSubnet(subnet models.Subnet) error {
end := binary.BigEndian.Uint32(subnet.End.Data[len(subnet.End.Data)-4:])

// Iterate through the range of IP's and insert a record for each.
for ; start < end; start++ {
for ; start <= end; start++ {
// IP's are stored as 16 byte arrays and we're only doing IPv4 so prepend
// the net.IP prefix that denotes an IPv4 address.
prefix := []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}
Expand Down

0 comments on commit a6659e1

Please sign in to comment.