-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
lbipam: Fix off-by-one error in rangeFromPrefix #29425
Conversation
b46c6c0
to
9845e2a
Compare
/test |
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.
Nice catch
9845e2a
to
2d85649
Compare
Rebased on the latest main. |
/test |
Looks like this needs a rebase to pull in a2694fc to fix the failing runtime tests. |
There's an off-by-one error in rangeFromPrefix that miscalculates the end of the allocatable IP range when the prefix length is not byte-aligned. We couldn't catch this bug with the test because the expected value in the test was wrong. netipx package provides a convenient function netipx.PrefixLastIP which does what we want. Rely on that instead of calculating it by ourselves. Fixes: cilium#29410 Fixes: 32feef5 Fixes: 27322f3 Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
2d85649
to
664342a
Compare
Thanks! Rebased... |
/test |
Hmm the image build failure is very mysterious (thanks Tobias for retrying). Now it's succeeding, so it's an intermittent error. Sort of rate limiting I guess...
|
Retriggered all tests failed with timeout waiting for the image build. |
Cilium E2E: #29476 |
There's an off-by-one error in rangeFromPrefix that miscalculates the end of the allocatable IP range when the prefix length is not byte-aligned. We couldn't catch this bug with the test because the expected value in the test was wrong.
netipx package provides a convenient function netipx.PrefixLastIP which does what we want. Rely on that instead of calculating it by ourselves.
Fixes: #29410
Fixes: 32feef5
Fixes: 27322f3