From: Martin Kletzander Date: Tue, 9 Aug 2022 13:00:06 +0000 (+0200) Subject: vmx: Require networkName for bridged and custom NICs X-Git-Tag: v8.7.0-rc1~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db0564b4d34fb94fe59f04a4e411374ec1b6fc19;p=thirdparty%2Flibvirt.git vmx: Require networkName for bridged and custom NICs Commit 70768cda9740 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 Reviewed-by: Reviewed-by: Ján Tomko --- diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 49eef12e3e..7b705b895e 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -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; }