-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
host-local: remove redundant startRange in RangeIterator to avoid mismatching with startIP #583
Conversation
/assign @squeed |
@@ -215,6 +215,7 @@ func (i *RangeIter) Next() (*net.IPNet, net.IP) { | |||
|
|||
if i.startIP == nil { | |||
i.startIP = i.cur | |||
i.startRange = i.rangeIdx | |||
} else if i.rangeIdx == i.startRange && i.cur.Equal(i.startIP) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I look at this, do we even need startRange
? Since we validate that ranges can't overlap, that should be sufficient, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, good self-question :) , maybe I should walk all lines to figure this out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mars1024 any thoughts on whether we can remove startRange
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think startRange
is redundant and I'll remove it
…i ranges Signed-off-by: Bruce Ma <[email protected]>
ff86568
to
b811967
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks!
This looks awesome, thanks! |
Ref to #579 , just try another way to fix the same issue. Here is the details #579 (comment).
Signed-off-by: Bruce Ma [email protected]
Fixes #594