Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Nov 22, 2023
1 parent 9727e5e commit 5b8ca35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func ipNetToRange(ipNet net.IPNet) netWithRange {

lastIPMask := make(net.IPMask, len(ipNet.Mask))
copy(lastIPMask, ipNet.Mask)
for i := 0; i < len(lastIPMask); i++ {
for i := range lastIPMask {
index := len(lastIPMask) - 1 - i
lastIPMask[index] = ^lastIPMask[index]
lastIP[index] |= lastIPMask[index]
Expand Down

0 comments on commit 5b8ca35

Please sign in to comment.