• L
    network: centralize check for active network during interface attach · 34cc3b2f
    Laine Stump 提交于
    The check for a network being active during interface attach was being
    done individually in several places (by both the lxc driver and the
    qemu driver), but those places were too specific, leading to it *not*
    being checked when allocating a connection/device from a macvtap or
    hostdev network.
    
    This patch puts a single check in networkAllocateActualDevice(), which
    is always called before the any network interface is attached to any
    type of domain. It also removes all the other now-redundant checks
    from the lxc and qemu drivers.
    
    NB: the following patches are prerequisites for this patch, in the
    case that it is backported to any branch:
    
      440beeb7 network: fix virNetworkObjAssignDef and persistence
      8aaa5b68 network: create statedir during driver initialization
      b9e95491 network: change location of network state xml files
      411c5486 network: set macvtap/hostdev networks active if their state
              file exists
    
    This fixes:
    
      https://bugzilla.redhat.com/show_bug.cgi?id=880483
    34cc3b2f
qemu_command.c 422.8 KB