Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
bde909c5
Commit
bde909c5
authored
Apr 17, 2017
by
Robert Pothier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes an issue in cide_set.go
Function getBeginingAndEndIndices may return end index too big
parent
190a0cab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cidr_set.go
pkg/controller/node/cidr_set.go
+1
-1
cidr_set_test.go
pkg/controller/node/cidr_set_test.go
+2
-2
No files found.
pkg/controller/node/cidr_set.go
View file @
bde909c5
...
...
@@ -79,7 +79,7 @@ func (s *cidrSet) allocateNext() (*net.IPNet, error) {
}
func
(
s
*
cidrSet
)
getBeginingAndEndIndices
(
cidr
*
net
.
IPNet
)
(
begin
,
end
int
,
err
error
)
{
begin
,
end
=
0
,
s
.
maxCIDRs
begin
,
end
=
0
,
s
.
maxCIDRs
-
1
cidrMask
:=
cidr
.
Mask
maskSize
,
_
:=
cidrMask
.
Size
()
...
...
pkg/controller/node/cidr_set_test.go
View file @
bde909c5
...
...
@@ -249,7 +249,7 @@ func TestOccupy(t *testing.T) {
subNetMaskSize
:
16
,
subNetCIDRStr
:
"127.0.0.0/8"
,
expectedUsedBegin
:
0
,
expectedUsedEnd
:
25
6
,
expectedUsedEnd
:
25
5
,
expectErr
:
false
,
},
{
...
...
@@ -257,7 +257,7 @@ func TestOccupy(t *testing.T) {
subNetMaskSize
:
16
,
subNetCIDRStr
:
"127.0.0.0/2"
,
expectedUsedBegin
:
0
,
expectedUsedEnd
:
25
6
,
expectedUsedEnd
:
25
5
,
expectErr
:
false
,
},
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment