Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hallyn committed Oct 25, 2023
1 parent 056c569 commit 5feaad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ORAS_VERSION := 1.0.0-rc.1
REGCTL := $(TOOLSDIR)/bin/regctl
REGCTL_VERSION := 0.5.0
TOPDIR := $(shell git rev-parse --show-toplevel)
BOOTKIT_VERSION ?= "v0.0.17.231018"
BOOTKIT_VERSION ?= "v0.0.18.tmp"
ROOTFS_VERSION = $(BOOTKIT_VERSION)

archout = $(shell arch)
Expand Down
3 changes: 3 additions & 0 deletions pkg/mosconfig/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"strings"

"github.com/apex/log"
"github.com/pkg/errors"
"github.com/project-machine/mos/pkg/utils"
)
Expand All @@ -24,9 +25,11 @@ func (t Target) ValidateNetwork() bool {

for _, p := range n.Ports {
if p.HostPort > 65536 || p.ContainerPort > 65536 {
log.Warnf("too-high port %d or %d", p.HostPort, p.ContainerPort)
return false
}
if p.HostPort == 0 || p.ContainerPort == 0 {
log.Warnf("zero port %d or %d", p.HostPort, p.ContainerPort)
return false
}
}
Expand Down

0 comments on commit 5feaad5

Please sign in to comment.