1. 21 12月, 2012 4 次提交
  2. 02 11月, 2012 1 次提交
  3. 21 9月, 2012 1 次提交
  4. 31 8月, 2012 1 次提交
  5. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  6. 19 7月, 2012 2 次提交
  7. 17 7月, 2012 1 次提交
    • S
      Convert 'raw MAC address' usages to use virMacAddr · 387117ad
      Stefan Berger 提交于
      Introduce new members in the virMacAddr 'class'
      - virMacAddrSet: set virMacAddr from a virMacAddr
      - virMacAddrSetRaw: setting virMacAddr from raw 6 byte MAC address buffer
      - virMacAddrGetRaw: writing virMacAddr into raw 6 byte MAC address buffer
      - virMacAddrCmp: comparing two virMacAddr
      - virMacAddrCmpRaw: comparing a virMacAddr with a raw 6 byte MAC address buffer
      
      then replace raw MAC addresses by replacing
      
      - 'unsigned char *' with virMacAddrPtr
      - 'unsigned char ... [VIR_MAC_BUFLEN]' with virMacAddr
      
      and introduce usage of above functions where necessary.
      387117ad
  8. 15 6月, 2012 1 次提交
  9. 02 6月, 2012 1 次提交
    • S
      nwfilter: move code for IP address map into separate file · 797b4758
      Stefan Berger 提交于
      The goal of this patch is to prepare for support for multiple IP
      addresses per interface in the DHCP snooping code.
      
      Move the code for the IP address map that maps interface names to
      IP addresses into their own file. Rename the functions on the way
      but otherwise leave the code as-is. Initialize this new layer
      separately before dependent layers (iplearning, dhcpsnooping)
      and shut it down after them.
      797b4758
  10. 28 1月, 2012 1 次提交
  11. 09 12月, 2011 2 次提交
    • S
      Pass the VM's UUID into the nwfilter subsystem · 33eb3567
      Stefan Berger 提交于
      A preparatory patch for DHCP snooping where we want to be able to
      differentiate between a VM's interface using the tuple of
      <VM UUID, Interface MAC address>. We assume that MAC addresses could
      possibly be re-used between different networks (VLANs) thus do not only
      want to rely on the MAC address to identify an interface.
      
      At the current 'final destination' in virNWFilterInstantiate I am leaving
      the vmuuid parameter as ATTRIBUTE_UNUSED until the DHCP snooping patches arrive.
      (we may not post the DHCP snooping patches for 0.9.9, though)
      
      Mostly this is a pretty trivial patch. On the lowest layers, in lxc_driver
      and uml_conf, I am passing the virDomainDefPtr around until I am passing
      only the VM's uuid into the NWFilter calls.
      33eb3567
    • S
      nwfilter: cleanup return codes in nwfilter subsystem · 95ff5899
      Stefan Berger 提交于
      This patch cleans up return codes in the nwfilter subsystem.
      
      Some functions in nwfilter_conf.c (validators and formatters) are
      keeping their bool return for now and I am converting their return
      code to true/false.
      
      All other functions now have failure return codes of -1 and success
      of 0.
      
      [I searched for all occurences of ' 1;' and checked all 'if ' and
      adapted where needed. After that I did a grep for 'NWFilter' in the source
      tree.]
      95ff5899
  12. 24 11月, 2011 1 次提交
  13. 23 11月, 2011 4 次提交
  14. 19 11月, 2011 5 次提交
    • S
      Rework value part of name-value pairs · 581d1cea
      Stefan Berger 提交于
      NWFilters can be provided name-value pairs using the following
      XML notation:
      
            <filterref filter='xyz'>
              <parameter name='PORT' value='80'/>
              <parameter name='VAL' value='abc'/>
            </filterref>
      
      The internal representation currently is so that a name is stored as a
      string and the value as well. This patch now addresses the value part of it
      and introduces a data structure for storing a value either as a simple
      value or as an array for later support of lists.
      
      This patch adjusts all code that was handling the values in hash tables
      and makes it use the new data type.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      581d1cea
    • D
      Move ifaceMacvtapLinkDump and ifaceGetNthParent functions · 91904106
      Daniel P. Berrange 提交于
      Move the ifaceMacvtapLinkDump and ifaceGetNthParent functions
      into virnetdevvportprofile.c since they are specific to that
      code. This avoids polluting the headers with the Linux specific
      netlink data types
      
      * src/util/interface.c, src/util/interface.h: Move
        ifaceMacvtapLinkDump and ifaceGetNthParent functions and delete
        remaining file
      * src/util/virnetdevvportprofile.c: Add ifaceMacvtapLinkDump
        and ifaceGetNthParent functions
      * src/network/bridge_driver.c, src/nwfilter/nwfilter_gentech_driver.c,
        src/nwfilter/nwfilter_learnipaddr.c, src/util/virnetdevmacvlan.c:
        Remove include of interface.h
      91904106
    • D
      Rename ifaceCheck to virNetDevValidateConfig · 6e0c4dce
      Daniel P. Berrange 提交于
      Rename the ifaceCheck method to virNetDevValidateConfig and change
      so that it always raises an error and returns -1 on error.
      
      * src/util/interface.c, src/util/interface.h: Rename ifaceCheck
        to virNetDevValidateConfig
      * src/nwfilter/nwfilter_gentech_driver.c,
        src/nwfilter/nwfilter_learnipaddr.c: Update for API rename
      6e0c4dce
    • D
      Move virNetDevGetIndex & virNetDevGetVLanID to virnetdev.c · 00bba08d
      Daniel P. Berrange 提交于
      Move virNetDevGetIndex & virNetDevGetVLanID to virnetdev.c to
      suit their functional purpose
      
      * util/interface.c, util/interface.h: Remove virNetDevGetIndex &
        virNetDevGetVLanID
      * util/virnetdev.c, util/virnetdev.h: Add virNetDevGetIndex &
        virNetDevGetVLanID
      00bba08d
    • D
      Rename ifaceGetIndex and ifaceGetVLAN · ebbb6bd1
      Daniel P. Berrange 提交于
      Rename the ifaceGetIndex method to virNetDevGetIndex and
      ifaceGetVlanID to virNetDevGetVLanID. Also change the error
      reporting behaviour to always raise errors and return -1 on
      failure
      
      * util/interface.c, util/interface.h: Rename ifaceGetIndex
        and ifaceGetVLAN
      * nwfilter/nwfilter_gentech_driver.c, nwfilter/nwfilter_learnipaddr.c,
        nwfilter/nwfilter_learnipaddr.c, util/virnetdevvportprofile.c: Update
        for API renames and error handling changes
      ebbb6bd1
  15. 10 11月, 2011 1 次提交
    • D
      Santize naming of socket address APIs · 4c544e6c
      Daniel P. Berrange 提交于
      The socket address APIs in src/util/network.h either take the
      form  virSocketAddrXXX, virSocketXXX or virSocketXXXAddr.
      
      Sanitize this so everything is virSocketAddrXXXX, and ensure
      that the virSocketAddr parameter is always the first one.
      
      * src/util/network.c, src/util/network.h: Santize socket
        address API naming
      * src/conf/domain_conf.c, src/conf/network_conf.c,
        src/conf/nwfilter_conf.c, src/network/bridge_driver.c,
        src/nwfilter/nwfilter_ebiptables_driver.c,
        src/nwfilter/nwfilter_learnipaddr.c,
        src/qemu/qemu_command.c, src/rpc/virnetsocket.c,
        src/util/dnsmasq.c, src/util/iptables.c,
        src/util/virnetdev.c, src/vbox/vbox_tmpl.c: Update for
        API renaming
      4c544e6c
  16. 22 7月, 2011 1 次提交
    • L
      util: make interface.c functions consistently return < 0 on error · f7e18208
      Laine Stump 提交于
      All of the functions in util/interface.c were returning 0 on success,
      but some returned -1 on error, and some returned a positive value
      (usually the value of errno, but sometimes just 1). Libvirt's standard
      is to return < 0 on error (in the case of functions that need to
      return errno, -errno is returned.
      
      This patch modifies all functions in interface.c to consistently
      return < 0 on error, and makes changes to callers of those functions
      where necessary.
      f7e18208
  17. 25 6月, 2011 1 次提交
    • E
      build: update gnulib for intprops · 89d994ad
      Eric Blake 提交于
      Done as a separate commit to make backporting the next patch easier.
      We are already using "intprops.h", but this makes it explicit.
      
      * .gnulib: Update, for syntax-check fix.
      * bootstrap.conf (gnulib_modules): Make intprops use explicit.
      * src/locking/domain_lock.c (includes): Drop unused header.
      * src/nwfilter/nwfilter_learnipaddr.c (includes): Use "", not <>,
      for gnulib.
      89d994ad
  18. 06 5月, 2011 1 次提交
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  19. 30 4月, 2011 1 次提交
  20. 25 2月, 2011 2 次提交
    • D
      Allow hash tables to use generic pointers as keys · 16ba2aaf
      Daniel P. Berrange 提交于
      Relax the restriction that the hash table key must be a string
      by allowing an arbitrary hash code generator + comparison func
      to be provided
      
      * util/hash.c, util/hash.h: Allow any pointer as a key
      * internal.h: Include stdbool.h as standard.
      * conf/domain_conf.c, conf/domain_conf.c,
        conf/nwfilter_params.c, nwfilter/nwfilter_gentech_driver.c,
        nwfilter/nwfilter_gentech_driver.h, nwfilter/nwfilter_learnipaddr.c,
        qemu/qemu_command.c, qemu/qemu_driver.c,
        qemu/qemu_process.c, uml/uml_driver.c,
        xen/xm_internal.c: s/char */void */ in hash callbacks
      16ba2aaf
    • D
      Remove deallocator parameter from hash functions · 6952708c
      Daniel P. Berrange 提交于
      Since the deallocator is passed into the constructor of
      a hash table it is not desirable to pass it into each
      function again. Remove it from all functions, but provide
      a virHashSteal to allow a item to be removed from a hash
      table without deleteing it.
      
      * src/util/hash.c, src/util/hash.h: Remove deallocator
        param from all functions. Add virHashSteal
      * src/libvirt_private.syms: Add virHashSteal
      * src/conf/domain_conf.c, src/conf/nwfilter_params.c,
        src/nwfilter/nwfilter_learnipaddr.c,
        src/qemu/qemu_command.c, src/xen/xm_internal.c: Update
        for changed hash API
      6952708c
  21. 21 2月, 2011 1 次提交
    • E
      hash: make virHashFree more free-like · 03ba07cb
      Eric Blake 提交于
      Two-argument free functions are uncommon; match the style elsewhere
      by caching the callback at creation.
      
      * src/util/hash.h (virHashCreate, virHashFree): Move deallocator
      argument to creation.
      * cfg.mk (useless_free_options): Add virHashFree.
      * src/util/hash.c (_virHashTable): Track deallocator.
      (virHashCreate, virHashFree): Update to new signature.
      * src/conf/domain_conf.c (virDomainObjListDeinit)
      (virDomainObjListInit, virDomainDiskDefForeachPath)
      (virDomainSnapshotObjListDeinit, virDomainSnapshotObjListInit):
      Update callers.
      * src/conf/nwfilter_params.c (virNWFilterHashTableFree)
      (virNWFilterHashTableCreate): Likewise.
      * src/conf/nwfilter_conf.c (virNWFilterTriggerVMFilterRebuild):
      Likewise.
      * src/cpu/cpu_generic.c (genericHashFeatures, genericBaseline):
      Likewise.
      * src/xen/xm_internal.c (xenXMOpen, xenXMClose): Likewise.
      * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit)
      (virNWFilterLearnShutdown): Likewise.
      * src/qemu/qemu_command.c (qemuDomainPCIAddressSetCreate)
      (qemuDomainPCIAddressSetFree): Likewise.
      * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
      03ba07cb
  22. 18 2月, 2011 1 次提交
    • C
      remove no longer needed calls to virReportOOMError · 9905c69e
      Christophe Fergeau 提交于
      Now that the virHash handling functions call virReportOOMError by
      themselves when needed, users of the virHash API no longer need to
      do it by themselves. Since users of the virHash API were not
      consistently calling virReportOOMError after memory failures from
      the virHash code, this has the added benefit of making OOM
      reporting from this code more consistent and reliable.
      9905c69e
  23. 29 1月, 2011 1 次提交
  24. 22 10月, 2010 1 次提交
    • D
      Remove all use of inet_pton and inet_ntop · a8ae7d19
      Daniel P. Berrange 提交于
      The  inet_pton and inet_ntop functions are obsolete, replaced
      by getaddrinfo+getnameinfo with the AI_NUMERICHOST flag set.
      These can be accessed via the virSocket APIs.
      
      The bridge.c code had methods for fetching the IP address of
      a bridge which used inet_ntop. Aside from the use of inet_ntop
      these methods are broken, because a NIC can have multiple
      addresses and this only returns one address. Since the methods
      are never used, just remove them.
      
      * src/conf/network_conf.c, src/nwfilter/nwfilter_learnipaddr.c:
        Replace inet_pton and inet_ntop with virSocket APIs
      * src/util/bridge.c, src/util/bridge.h: Remove unused methods
        which called inet_ntop.
      a8ae7d19
  25. 28 9月, 2010 1 次提交
  26. 27 9月, 2010 1 次提交
  27. 17 8月, 2010 1 次提交
    • S
      nwfilter: extend nwfilter reload support · cf6f8b9a
      Stefan Berger 提交于
      In this patch I am extending and fixing the nwfilter module's reload support to stop all ongoing threads (for learning IP addresses of interfaces) and rebuild the filtering rules of all interfaces of all VMs when libvirt is started. Now libvirtd rebuilds the filters upon the SIGHUP signal and libvirtd restart.
      
      About the patch: The nwfilter functions require a virConnectPtr. Therefore I am opening a connection in qemudStartup, which later on needs to be closed outside where the driver lock is held since otherwise it ends up in a deadlock due to virConnectClose() trying to lock the driver as well.
      
      I have tested this now for a while with several machines running and needing the IP address learner thread(s). The rebuilding of the firewall rules seems to work fine following libvirtd restart or a SIGHUP. Also the termination of libvirtd worked fine.
      cf6f8b9a