[PATCH 3/5] vmx: Require networkName for bridged and custom NICs

Martin Kletzander mkletzan at redhat.com
Wed Aug 17 12:50:38 UTC 2022


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 at redhat.com>
---
 src/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 49eef12e3ea7..7b705b895ed1 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;
     }
 
-- 
2.37.2



More information about the libvir-list mailing list