telepresenceio / telepresence

Local development against a remote Kubernetes or OpenShift cluster

Home Page:https://www.telepresence.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logic error in subnet.RandomIPv4Subnet()

msd-olo opened this issue · comments

Describe the bug
The reset for inUse bool is outside of the for loop to process entire network ranges meaning any overlapping subnet in a given network range will cause all subsequent subnets to be considered an overlap.

I believe the fix is to move this line inside of the for loop.

Good catch @msd-olo. Would you mind providing a PR?

No problem. I'll send one along.