1. 28 11月, 2011 3 次提交
  2. 25 11月, 2011 4 次提交
  3. 24 11月, 2011 20 次提交
  4. 23 11月, 2011 13 次提交
    • P
      qemu: Avoid dereference of NULL pointer · c4b32641
      Peter Krempa 提交于
      If something fails while initializing qemu job object in
      qemuDomainObjPrivateAlloc(), memory to the private pointer is freed, but
      after that, the pointer is still dereferenced, which may result in a
      segfault.
      
      * qemuDomainObjPrivateAlloc() - Don't dereference NULL pointer.
      c4b32641
    • E
      qemu: fix a const-correctness issue · db2f6807
      Eric Blake 提交于
      Generally, functions which return malloc'd strings should be typed
      as 'char *', not 'const char *', to make it obvious that the caller
      is responsible to free things.  free(const char *) fails to compile,
      and although we have a cast embedded in VIR_FREE to work around poor
      code that frees const char *, it's better to not rely on that hack.
      
      * src/qemu/qemu_driver.c (qemuDiskPathToAlias): Change return type.
      (qemuDomainBlockJobImpl): Update caller.
      db2f6807
    • E
      API: prefer 'disk' over 'block' or 'path' · 3ac26e26
      Eric Blake 提交于
      Given that we can now handle the target's disk shorthand, in addition
      to an absolute path to the file or block device used on the host,
      the term 'disk' fits a bit better as the parameter name than 'path'.
      
      * include/libvirt/libvirt.h.in: Update some parameter names.
      * src/libvirt.c (virDomainBlockStats, virDomainBlockStatsFlags)
      (virDomainBlockPeek, virDomainGetBlockInfo, virDomainBlockJobAbort)
      (virDomainGetBlockJobInfo, virDomainBlockJobSetSpeed)
      (virDomainBlockPull): Likewise.
      3ac26e26
    • E
      blockstats: support lookup by path in blockstats · c725e2dc
      Eric Blake 提交于
      Commit 89b6284f made it possible to pass either a source name or
      the target device to most API demanding a disk designation, but
      forgot to update the documentation.  It also failed to update
      virDomainBlockStats to take both forms. This patch fixes both the
      documentation and the remaining function.
      
      Xen continues to use just device shorthand (that is, I did not
      implement path lookup there, since xen does not track a domain_conf
      to quickly tie a path back to the device shorthand).
      
      * src/libvirt.c (virDomainBlockStats, virDomainBlockStatsFlags)
      (virDomainGetBlockInfo, virDomainBlockPeek)
      (virDomainBlockJobAbort, virDomainGetBlockJobInfo)
      (virDomainBlockJobSetSpeed, virDomainBlockPull): Document
      acceptable disk naming conventions.
      * src/qemu/qemu_driver.c (qemuDomainBlockStats)
      (qemuDomainBlockStatsFlags): Allow lookup by source name.
      * src/test/test_driver.c (testDomainBlockStats): Likewise.
      c725e2dc
    • M
      nwfilter: Initialize virNWFilterAddIpAddrForIfname return variable · 489e14f2
      Michal Privoznik 提交于
      Latest nwfilter patch ad6c67cf introduced uninitialized return
      value. This was spotted by 4.6.2 gcc.
      489e14f2
    • D
      Fix disabling of virtual port profile code on old hosts · aad764e1
      Daniel P. Berrange 提交于
      The WITH_VIRTUALPORT macro is defined to 0 when disabled, not
      left undefined. So #if must be used instead of #ifdef
      
      * src/util/virnetdevvportprofile.c: s/#ifdef/#if/
      aad764e1
    • D
      Fix uninitialized variable in NWfilter IP learning code · 3fb94eee
      Daniel P. Berrange 提交于
      * src/nwfilter/nwfilter_learnipaddr.c: Initialize ret variable
      3fb94eee
    • M
      virsh: Increase device-detach intelligence · ea7182c2
      Michal Prívozník 提交于
      Up to now users have to give a full XML description on input when
      device-detaching. If they omitted something it lead to unclear
      error messages (like generated MAC wasn't found, etc.).
      With this patch users can specify only those information which
      specify one device sufficiently precise. Remaining information is
      completed from domain.
      ea7182c2
    • S
      Enable detection of multiple IP addresses · ad6c67cf
      Stefan Berger 提交于
      In preparation of DHCP Snooping and the detection of multiple IP
      addresses per interface:
      
      The hash table that is used to collect the detected IP address of an
      interface can so far only handle one IP address per interface. With
      this patch we extend this to allow it to handle a list of IP addresses.
      
      Above changes the returned variable type of virNWFilterGetIpAddrForIfname()
      from char * to virNWFilterVarValuePtr; adapt all existing functions calling
      this function.
      ad6c67cf
    • E
      fix error message when using wrong URI alias · 5c5e07b8
      Eli Qiao 提交于
      Signed-off-by: NEli Qiao <taget@linux.vnet.ibm.com>
      
      When configuring a URI alias like this in 'libvirt.conf':
      
      uri_aliases = [
        "jj#j=qemu+ssh://root@127.0.0.1/system",
        "sleet=qemu+ssh://root@sleet.cloud.example.com/system",
      ]
      virsh -c jj#j
      
      It will show this error message:
      'no connection driver available for No connection for URI jj#j'
      Actually,we expect this message below:
      Malformed 'uri_aliases' config entry 'jj#j=qemu+ssh://root@127.0.0.1/system', aliases may only contain 'a-Z, 0-9, _, -'
      
      Give this patch to fix this error.
      5c5e07b8
    • S
      Pass additional parameter into applyDHCPOnly function · 7ca82ecb
      Stefan Berger 提交于
      In preparation for the DHCP Snooping code:
      Pass an additional parameter into the applyDHCPOnly function
      of the 'techdriver'.
      7ca82ecb
    • S
      nwfilter: use shell variable to invoke 'ip(6)tables' command · aa1cb7e7
      Stefan Berger 提交于
      Introduce a shell variable 'IBT' to invoke the ip(6)tables command.
      
      Tested with libvirt-tck.
      aa1cb7e7
    • S
      nwfilter: use shell variable to invoke 'ebtables' command · 970b417a
      Stefan Berger 提交于
      Introduce a shell variable 'EBT' to invoke the ebtables command.
      Hard-code the used ebtables table to '-t nat'.
      
      Tested with libvirt-tck.
      970b417a