1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-12 13:17:58 +03:00

vmx: Require networkName for bridged and custom NICs

Commit 70768cda97 marked this particular config string optional, but
forgot that two of the interface types still require this name to
exist.  Mark it as optional only if there is no connectionType.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Martin Kletzander 2022-08-09 15:00:06 +02:00
parent f519f77d81
commit db0564b4d3

View File

@ -2826,7 +2826,7 @@ virVMXParseEthernet(virConf *conf, int controller, virDomainNetDef **def)
STRCASEEQ(connectionType, "bridged") ||
STRCASEEQ(connectionType, "custom")) {
if (virVMXGetConfigString(conf, networkName_name, &networkName,
true) < 0)
connectionType == NULL) < 0)
goto cleanup;
}