Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ui/validate.func
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ validate_gateway_in_subnet() {
local ip="${static_ip%%/*}"
local cidr="${static_ip##*/}"

# /31 and /32 have no usable subnet, so an off-subnet gateway is normal there.
((cidr >= 31)) && return 0

# Convert CIDR to netmask bits
local mask=$((0xFFFFFFFF << (32 - cidr) & 0xFFFFFFFF))

Expand Down
Loading