Skip to content

Commit 7d590fa

Browse files
committed
fix: port typo
Signed-off-by: cong <q1875486458@gmail.com>
1 parent 3ba1db8 commit 7d590fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/ir/infra.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ func (i *Infra) Validate() error {
208208

209209
// Validate validates the provided ProxyInfra.
210210
func (p *ProxyInfra) Validate() error {
211+
var MaxPort int32 = 65535
211212
var errs []error
212213

213214
if len(p.Name) == 0 {
@@ -224,10 +225,10 @@ func (p *ProxyInfra) Validate() error {
224225
if len(listener.Ports[j].Name) == 0 {
225226
errs = append(errs, errors.New("listener name field required"))
226227
}
227-
if listener.Ports[j].ServicePort < 1 || listener.Ports[j].ServicePort > 65353 {
228+
if listener.Ports[j].ServicePort < 1 || listener.Ports[j].ServicePort > MaxPort {
228229
errs = append(errs, errors.New("listener service port must be a valid port number"))
229230
}
230-
if listener.Ports[j].ContainerPort < 1 || listener.Ports[j].ContainerPort > 65353 {
231+
if listener.Ports[j].ContainerPort < 1 || listener.Ports[j].ContainerPort > MaxPort {
231232
errs = append(errs, errors.New("listener container port must be a valid port number"))
232233
}
233234
}

0 commit comments

Comments
 (0)