File db0564b4-vmx-Require-networkName.patch of Package libvirt.29155

commit 5fd1c97048b97011e5594d82e5b103a2d445735f
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Tue Aug 9 15:00:06 2022 +0200

    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 <mkletzan@redhat.com>
    Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
    (cherry picked from commit db0564b4d34fb94fe59f04a4e411374ec1b6fc19)
    
     Conflicts:
            src/vmx/vmx.c
    
    Conflict due to not backporting 70768cda9740. See bsc#1202630 for more
    details.

Index: libvirt-8.0.0/src/vmx/vmx.c
===================================================================
--- libvirt-8.0.0.orig/src/vmx/vmx.c
+++ libvirt-8.0.0/src/vmx/vmx.c
@@ -2830,7 +2830,7 @@ virVMXParseEthernet(virConf *conf, int c
         STRCASEEQ(connectionType, "bridged") ||
         STRCASEEQ(connectionType, "custom")) {
         if (virVMXGetConfigString(conf, networkName_name, &networkName,
-                                  false) < 0)
+                                  connectionType == NULL) < 0)
             goto cleanup;
     }
 
openSUSE Build Service is sponsored by