Skip to content

Commit

Permalink
fix(tunnels): fix encap port validation
Browse files Browse the repository at this point in the history
Make new logic similar to previous logic and remove superfluous check

Co-authored-by: Tom Wieczorek <[email protected]>
  • Loading branch information
aauren and twz123 authored Oct 8, 2024
1 parent 8ddc8aa commit 689f746
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tunnels/linux_tunnels.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func ParseEncapType(encapType string) (EncapType, error) {
type EncapPort uint16

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

0 comments on commit 689f746

Please sign in to comment.