[pve-devel] [RFC PATCH pve-installer 6/6] closes #5757: common: add checks for valid IPv4 address within subnet

Michael Köppl m.koeppl at proxmox.com
Mon Apr 28 16:20:53 CEST 2025


On 4/28/25 12:22, Christoph Heiss wrote:
> At least for IPv4 /31 prefixes, this check (including the network
> address part) is wrong. RFC 3021 [0] explicitly allows such subnets for
> point-to-point links.
> 
> E.g. 192.168.0.0/31 is a valid subnet with 2 hosts, 192.168.0.0/31 and
> 192.168.0.1/31.
> 
> [0] https://www.rfc-editor.org/rfc/rfc3021

You're right, I missed that. Thanks! I think for /32 and /31 it makes 
sense to explicitly allow them, avoiding the calculations done for any 
other valid subnet mask. I'll adapt the implementation accordingly in a v2.




More information about the pve-devel mailing list