mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-28 03:40:03 +00:00
fix(build): allow /31 and /32 CIDR with out-of-subnet gateway (#13231)
This commit is contained in:
parent
7ed27dcdb8
commit
f29606ae87
1 changed files with 4 additions and 0 deletions
|
|
@ -529,6 +529,10 @@ validate_gateway_in_subnet() {
|
|||
local ip="${static_ip%%/*}"
|
||||
local cidr="${static_ip##*/}"
|
||||
|
||||
# /31 and /32 are valid point-to-point / zero-trust DMZ configurations
|
||||
# where the gateway is technically outside the subnet — skip validation
|
||||
((cidr >= 31)) && return 0
|
||||
|
||||
# Convert CIDR to netmask bits
|
||||
local mask=$((0xFFFFFFFF << (32 - cidr) & 0xFFFFFFFF))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue