Fix max port value to 65535

Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
This commit is contained in:
Andy Goldstein 2019-06-24 15:13:27 -04:00
parent a5c727e26f
commit 9bba2c93ec
No known key found for this signature in database
GPG Key ID: 40F5986D66395469
2 changed files with 4 additions and 4 deletions

View File

@ -152,8 +152,8 @@ func (o *CombinedInsecureServingOptions) Validate() []error {
errors := []error{}
if o.BindPort < 0 || o.BindPort > 65335 {
errors = append(errors, fmt.Errorf("--port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort))
if o.BindPort < 0 || o.BindPort > 65535 {
errors = append(errors, fmt.Errorf("--port %v must be between 0 and 65535, inclusive. 0 for turning off insecure (HTTP) port", o.BindPort))
}
if len(o.BindAddress) > 0 && net.ParseIP(o.BindAddress) == nil {

View File

@ -54,8 +54,8 @@ func (s *DeprecatedInsecureServingOptions) Validate() []error {
errors := []error{}
if s.BindPort < 0 || s.BindPort > 65335 {
errors = append(errors, fmt.Errorf("insecure port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", s.BindPort))
if s.BindPort < 0 || s.BindPort > 65535 {
errors = append(errors, fmt.Errorf("insecure port %v must be between 0 and 65535, inclusive. 0 for turning off insecure (HTTP) port", s.BindPort))
}
return errors