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>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
}
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;