1. 23 3月, 2017 10 次提交
    • J
      conf: Remove NONNULL(1,2) for virNetDevBandwidthFormat · 5b93aa57
      John Ferlan 提交于
      Since the code checks and handles NULL parameters, remove the NONNULL
      from the prototype.
      
      Also fix the comment in the source to reference the right name.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5b93aa57
    • J
      conf: Remove NONNULL(2) for virNetDevBandwidthParse · 273e71e7
      John Ferlan 提交于
      Since the code checks and handles a NULL 'node' before proceeding
      there's no need for the prototype with the NONNULL(2).
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      273e71e7
    • J
      util: Remove NONNULL(1) for virNetDevGetName · 91d28d99
      John Ferlan 提交于
      The 'ifindex' argument is not a pointer, so no need for NONNULL in prototype
      91d28d99
    • J
      qemu: Always format formatStr for blockdev-snapshot-sync · f2a76a26
      John Ferlan 提交于
      The qemuDomainSnapshotPrepare should always set a > 0 format value anyway,
      so remove the check.
      
      Found by Coverity.
      f2a76a26
    • L
      network: reconnect tap devices during networkNotifyActualDevice · 85bcc022
      Laine Stump 提交于
      If a network is destroyed and restarted, or its bridge is changed, any
      tap devices that had previously been connected to the bridge will no
      longer be connected. As a first step in automating a reconnection of
      all tap devices when this happens, this patch modifies
      networkNotifyActualDevice() (which is called once for every
      <interface> of every active domain whenever libvirtd is restarted) to
      reconnect any tap devices that it finds disconnected.
      
      With this patch in place, you will need to restart libvirtd to
      reconnect all the taps to their proper bridges. A future patch will
      add a callback that hypervisor drivers can register with the network
      driver to that the network driver can trigger this behavior
      automatically whenever a network is started.
      85bcc022
    • L
      util: new function virNetDevTapAttachBridge() · a4541349
      Laine Stump 提交于
      This patch splits out the part of virNetDevTapCreateInBridgePort()
      that would need to be re-done if an existing tap device had to be
      re-attached to a bridge, and puts it into a separate function. This
      can be used both when an existing domain interface config is updated
      to change its connection, and also to re-attach to the "same" bridge
      when a network has been stopped and restarted. So far it is used for
      nothing.
      a4541349
    • L
      util: new function virNetDevGetMaster() · e75f5bfb
      Laine Stump 提交于
      This function provides the bridge/bond device that the given network
      device is attached to. The return value is 0 or -1, and the master
      device is a char** argument to the function - this is needed in order
      to allow for a "success" return from a device that has no master.
      e75f5bfb
    • L
      5a4a0db0
    • L
      util: allow retrieving ethtool features when unprivileged · 549fe5a8
      Laine Stump 提交于
      The only reason that the ethtool features weren't being retrieved in
      an unprivileged libvirtd was because they required ioctl(), and the
      ioctl was using an AF_PACKET socket, which requires root. Now that we
      are using AF_UNIX for ioctl(), this restriction can be removed.
      549fe5a8
    • L
      util: use AF_UNIX family (not AF_PACKET) for ioctl sockets · 1c9a8746
      Laine Stump 提交于
      The exact family of the socket created for the fd used by ioctl(7)
      doesn't matter, it just needs to be a socket and not a file. But for
      some reason when macvtap support was added, it used
      AF_PACKET/SOCK_DGRAM sockets for its ioctls; we later used the same
      AF_PACKET/SOCK_DGRAM socket for new ioctls we added, and eventually
      modified the other pre-existing ioctl sockets (for creating/deleting
      bridges) to also use AF_PACKET/SOCK_DGRAM (that code originally used
      AF_UNIX/SOCK_STREAM).
      
      The problem with using AF_PACKET (intended for sending/receiving "raw"
      packets, i.e. packets that can be some protocol other than TCP or UDP)
      is that it requires root privileges. This meant that none of the
      ioctls in virnetdev.c or virnetdevip.c would work when running
      libvirtd unprivileged.
      
      This packet solves that problem by changing the family to AF_UNIX when
      creating the socket used for any ioctl().
      1c9a8746
  2. 22 3月, 2017 7 次提交
  3. 21 3月, 2017 4 次提交
  4. 20 3月, 2017 1 次提交
  5. 18 3月, 2017 7 次提交
  6. 17 3月, 2017 11 次提交