]> xenbits.xensource.com Git - libvirt.git/commitdiff
vmx: Require networkName for bridged and custom NICs
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 9 Aug 2022 13:00:06 +0000 (15:00 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 18 Aug 2022 06:34:31 +0000 (08:34 +0200)
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 <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/vmx/vmx.c

index 49eef12e3ea7c4ce1337a2e33e6e71760af07ce3..7b705b895ed1d41f3c111638f832d3515e86d4fd 100644 (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;
     }