1. 17 1月, 2020 1 次提交
  2. 12 11月, 2019 1 次提交
  3. 16 10月, 2019 2 次提交
  4. 15 10月, 2019 1 次提交
  5. 14 10月, 2019 1 次提交
  6. 10 4月, 2019 3 次提交
  7. 15 1月, 2019 1 次提交
  8. 14 1月, 2019 1 次提交
  9. 12 1月, 2019 1 次提交
  10. 11 1月, 2019 3 次提交
  11. 14 12月, 2018 1 次提交
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  12. 05 12月, 2018 1 次提交
  13. 24 9月, 2018 1 次提交
  14. 07 9月, 2018 1 次提交
  15. 14 8月, 2018 1 次提交
  16. 13 8月, 2018 1 次提交
  17. 07 8月, 2018 3 次提交
  18. 27 4月, 2017 1 次提交
  19. 21 4月, 2017 1 次提交
    • P
      util: check ifa_addr pointer before accessing its elements · 42000bf7
      Pavel Hrdina 提交于
      Reported by Rafał Wojciechowski <it@rafalwojciechowski.pl>.
      
      Thread 1 (Thread 0x7f194b99d700 (LWP 5631)):
      0  virNetDevGetifaddrsAddress (addr=0x7f194b99c7c0, ifname=0x7f193400e2b0 "ovirtmgmt") at util/virnetdevip.c:738
      1  virNetDevIPAddrGet (ifname=0x7f193400e2b0 "ovirtmgmt", addr=addr@entry=0x7f194b99c7c0) at util/virnetdevip.c:795
      2  0x00007f19467800d6 in networkGetNetworkAddress (netname=<optimized out>, netaddr=netaddr@entry=0x7f1924013f18) at network/bridge_driver.c:4780
      3  0x00007f193e43a33c in qemuProcessGraphicsSetupNetworkAddress (listenAddr=0x7f19340f7650 "127.0.0.1", glisten=0x7f1924013f10) at qemu/qemu_process.c:4062
      4  qemuProcessGraphicsSetupListen (vm=<optimized out>, graphics=0x7f1924014f10, cfg=0x7f1934119f00) at qemu/qemu_process.c:4133
      5  qemuProcessSetupGraphics (flags=17, vm=0x7f19240155d0, driver=0x7f193411f1d0) at qemu/qemu_process.c:4196
      6  qemuProcessPrepareDomain (conn=conn@entry=0x7f192c00ab50, driver=driver@entry=0x7f193411f1d0, vm=vm@entry=0x7f19240155d0, flags=flags@entry=17) at qemu/qemu_process.c:4969
      7  0x00007f193e4417c0 in qemuProcessStart (conn=conn@entry=0x7f192c00ab50, driver=driver@entry=0x7f193411f1d0, vm=0x7f19240155d0,asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_START, migrateFrom=migrateFrom@entry=0x0, migrateFd=migrateFd@entry=-1, migratePath=migratePath@entry=0x0,snapshot=snapshot@entry=0x0, vmop=vmop@entry=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=17, flags@entry=1) at qemu/qemu_process.c:5553
      
      Man page for getifaddrs also states that the "ifa_addr" may contain
      a null pointer which happens if there is an existing network interface
      on the host without IP address.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      42000bf7
  20. 04 4月, 2017 1 次提交
    • C
      virNetDevIPCheckIPv6ForwardingCallback fixes · b202c39a
      Cédric Bosdonnat 提交于
      Add check for more than one RTA_OIF, even though this is rather
      unlikely.
      
      Get rid of the buggy switch / break as this code won't need to
      handle more attributes.
      
      Use VIR_WARNINGS_NO_CAST_ALIGN to fix impossible to fix
      util/virnetdevip.c:560:17: error: cast increases required alignment of target type [-Werror=cast-align]
      b202c39a
  21. 23 3月, 2017 1 次提交
    • 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
  22. 22 3月, 2017 1 次提交
  23. 10 2月, 2017 1 次提交
  24. 02 7月, 2016 2 次提交
    • L
      util: support setting peer for virNetDevIPInfo addresses · d83cac49
      Laine Stump 提交于
      This will apply to any IP address setting that uses
      virNetDevIPInfoAddToDev() (which so far is only the guest-side of LXC
      type='ethernet' interfaces).
      
      (This patch had been pushed earlier in
      commit cb20f989, but was reverted in
      commit cba06aea because it had been
      accidentally pushed during the freeze for release 2.0.0)
      d83cac49
    • L
      util: new function virNetDevIPInfoAddToDev · 95309424
      Laine Stump 提交于
      This patch takes the code out of
      lxcContainerRenameAndEnableInterfaces() that adds all IP addresses and
      IP routes to the interface, and puts it into a utility function
      virNetDevIPInfoAddToDev() in virnetdevip.c so that it can be used by
      anyone.
      
      One small change in functionality -
      lxcContainerRenameAndEnableInterfaces() previously would add all IP
      addresses to the interface while it was still offline, then set the
      interface online, and then add the routes. Because I don't want the
      utility function to set the interface online, I've moved this up so
      the interface is first set online, then IP addresses and routes are
      added. This is the same order that the network service from
      initscripts (in ifup-ether) does it, so it shouldn't pose any problem
      (and hasn't, in the tests that I've run).
      
      (This patch had been pushed earlier in commit
      f1e0d0da, but was reverted in commit
      05eab475 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      95309424
  25. 27 6月, 2016 8 次提交
    • J
      Revert "util: new function virNetDevIPInfoAddToDev" · 05eab475
      Ján Tomko 提交于
      This reverts commit f1e0d0da.
      
      This feature was accidentally pushed in the feature freeze.
      05eab475
    • J
      Revert "util: support setting peer for virNetDevIPInfo addresses" · cba06aea
      Ján Tomko 提交于
      This reverts commit cb20f989.
      
      This feature was accidentally pushed in the feature freeze.
      cba06aea
    • A
      Clean up after virNetDevIP creation · 7970436e
      Andrea Bolognani 提交于
      Commit cf0568b0 moved a bunch of functions from virNetDev
      to the more specific virNetDevIP; however, not all of the
      existing uses were moved properly, causing build failures on
      FreeBSD.
      
      Complete the transition to the new names and drop the
      obsolete declarations from the header file while at it.
      7970436e
    • A
      util: netdevip: Include vircommand.h · 014dd112
      Andrea Bolognani 提交于
      Not including the header causes
      
        util/virnetdevip.c:520:5: error:
        unknown type name 'virCommandPtr'; did you mean 'virCondPtr'?
          virCommandPtr cmd = NULL;
          ^~~~~~~~~~~~~
      
      and plenty more similar failures when compiling on FreeBSD.
      014dd112
    • L
      util: support setting peer for virNetDevIPInfo addresses · cb20f989
      Laine Stump 提交于
      This will apply to any IP address setting that uses
      virNetDevIPInfoAddToDev() (which so far is only the guest-side of LXC
      type='ethernet' interfaces).
      cb20f989
    • L
      util: new function virNetDevIPInfoAddToDev · f1e0d0da
      Laine Stump 提交于
      This patch takes the code out of
      lxcContainerRenameAndEnableInterfaces() that adds all IP addresses and
      IP routes to the interface, and puts it into a utility function
      virNetDevIPInfoAddToDev() in virnetdevip.c so that it can be used by
      anyone.
      
      One small change in functionality -
      lxcContainerRenameAndEnableInterfaces() previously would add all IP
      addresses to the interface while it was still offline, then set the
      interface online, and then add the routes. Because I don't want the
      utility function to set the interface online, I've moved this up so
      the interface is first set online, then IP addresses and routes are
      added. This is the same order that the network service from
      initscripts (in ifup-ether) does it, so it shouldn't pose any problem
      (and hasn't, in the tests that I've run).
      f1e0d0da
    • L
      lxc: move debug/error log when adding IP addresses to virNetDevIPAddrAdd · 4ff9ec7d
      Laine Stump 提交于
      It makes more sense to have the logging at the lower level so other
      callers can share the goodness.
      
      While removing so much stuff from / touching so many lines in
      lxcContainerRenameAndEnableInterfaces() (which used to have this
      debug/error logging), label names were changed and it was updated to
      use the now-more-common method of initializing ret to -1 (failure),
      then setting to 0 right before the cleanup label.
      4ff9ec7d
    • L
      conf: single object containing list of IP addresses, list of routes · 9911562a
      Laine Stump 提交于
      There are currently two places in the domain where this combination is
      used, and there is about to be another. This patch puts them together
      for brevity and uniformity.
      
      As with the newly-renamed virNetDevIPAddr and virNetDevIPRoute
      objects, the new virNetDevIPInfo object will need to be accessed by a
      utility function that calls low level Netlink functions (so we don't
      want it to be in the conf directory) and will be called from multiple
      hypervisor drivers (so it can't be in any hypervisor directory); the
      most appropriate place is thus once again the util directory.
      
      The parse and format functions are in conf/domain_conf.c because only
      the domain XML (i.e. *not* the network XML) has this exact combination
      of IP addresses plus routes. Note that virDomainNetIPInfoFormat() will
      end up being the only caller to virDomainNetRoutesFormat() and
      virDomainNetIPsFormat(), so it will just subsume those functions in a
      later patch, but we can't do that until they are no longer called.
      
      (It would have been nice to include the interface name within the
      virNetDevIPInfo object (with a slight name change), but that can't
      be done cleanly, because in each case the interface name is provided
      in a different place in the XML relative to the routes and IP
      addresses, so putting it in this object would actually make the code
      more confused rather than simpler).
      9911562a