Skip to content

Commit 1010e48

Browse files
aaurentwz123
andcommitted
fix(tunnels): fix encap port validation
Make new logic similar to previous logic and remove superfluous check Co-authored-by: Tom Wieczorek <[email protected]>
1 parent c9b75b4 commit 1010e48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/tunnels/linux_tunnels.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func ParseEncapType(encapType string) (EncapType, error) {
7070
type EncapPort uint16
7171

7272
func (e EncapPort) checkWithinRange() error {
73-
if uint16(e) > minPort && uint16(e) < maxPort {
73+
if uint16(e) >= minPort {
7474
return nil
7575
}
7676
return fmt.Errorf("specified encap port is out of range of valid ports: %d, valid range is from %d to %d",

0 commit comments

Comments
 (0)