On Tue Apr 22, 2025 at 6:27 PM CEST, Michael Köppl wrote: > Implement check if the address entered by the user is valid within the > given subnet, i.e. not a network address or broadcast address. > > Partially closes [0]. > > [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5757 > > Signed-off-by: Michael Köppl <m.koe...@proxmox.com> > --- > Some input / discussion would be much appreciated here, since this might > again be considered too restrictive. Multiple questions came up during > in-person discussion: > * Is check for broadcast address desired or is it considered a valid > configuration for PVE?
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 > * Is IPv6 check necessary and if so, is allowing to set the address to a > broadcast address a valid setting for IPv6? There's no traditional broadcast in IPv6, so no check necessary. (FWIW, multicast takes that role basically) _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel