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
54c48634
Commit
54c48634
authored
Oct 05, 2018
by
Darren Shepherd
Committed by
Erik Wilson
Aug 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow 127 and 169 for IP in endpoint
parent
b84cd305
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
validation.go
pkg/apis/core/validation/validation.go
+6
-6
No files found.
pkg/apis/core/validation/validation.go
View file @
54c48634
...
@@ -5097,12 +5097,12 @@ func validateNonSpecialIP(ipAddress string, fldPath *field.Path) field.ErrorList
...
@@ -5097,12 +5097,12 @@ func validateNonSpecialIP(ipAddress string, fldPath *field.Path) field.ErrorList
if
ip
.
IsUnspecified
()
{
if
ip
.
IsUnspecified
()
{
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
,
ipAddress
,
"may not be unspecified (0.0.0.0)"
))
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
,
ipAddress
,
"may not be unspecified (0.0.0.0)"
))
}
}
if
ip
.
IsLoopback
()
{
//
if ip.IsLoopback() {
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
,
ipAddress
,
"may not be in the loopback range (127.0.0.0/8)"
))
//
allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be in the loopback range (127.0.0.0/8)"))
}
//
}
if
ip
.
IsLinkLocalUnicast
()
{
//
if ip.IsLinkLocalUnicast() {
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
,
ipAddress
,
"may not be in the link-local range (169.254.0.0/16)"
))
//
allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be in the link-local range (169.254.0.0/16)"))
}
//
}
if
ip
.
IsLinkLocalMulticast
()
{
if
ip
.
IsLinkLocalMulticast
()
{
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
,
ipAddress
,
"may not be in the link-local multicast range (224.0.0.0/24)"
))
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
,
ipAddress
,
"may not be in the link-local multicast range (224.0.0.0/24)"
))
}
}
...
...
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