On 2/24/26 08:52, Laine Stump via Devel wrote:
From: Laine Stump <laine@redhat.com>
The slirp backend is limited in what the netmask/prefix of a user-specified IP address can be, but passt doesn't have these artificial limitations - any valid prefix is okay with passt, so we shouldn't reject them
Signed-off-by: Laine Stump <laine@redhat.com> --- src/qemu/qemu_validate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a0ddf512f1..1c6662751b 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1926,8 +1926,9 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net, } hasV4Addr = true;
- if (ip->prefix > 0 && - (ip->prefix < 4 || ip->prefix > 27)) { + if (net->backend.type != VIR_DOMAIN_NET_BACKEND_PASST && + (ip->prefix > 0 && + (ip->prefix < 4 || ip->prefix > 27))) { virReportError(VIR_ERR_XML_ERROR, "%s", _("invalid prefix, must be in range of 4-27")); return -1;
This block of code starts with: for (i = 0; i < net->guestIP.nips; i++) { const virNetDevIPAddr *ip = net->guestIP.ips[i]; if (net->type != VIR_DOMAIN_NET_TYPE_USER && net->backend.type != VIR_DOMAIN_NET_BACKEND_PASST) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Invalid attempt to set network interface guest-side IP address info, not supported for this interface type/backend")); return -1; } IOW this patch is a dead code, effectively. Michal