- 08 4月, 2010 13 次提交
-
-
由 Matthias Bolte 提交于
-
由 Diego Elio Pettenò 提交于
Just checking for a windres tool might hit even on Linux systems when building for Linux (e.g.: when using Gentoo and having built binutils with multitarget support), and will then fail to link properly at the end of the build. * configure.ac: Avoid searching for windres on non windows target
-
由 Stefan Berger 提交于
Removing the tests/nwfilterxml2xmltest executable that got in with a previous patch.
-
由 Stefan Berger 提交于
This patch implements support for learning a VM's IP address. It uses the pcap library to listen on the VM's backend network interface (tap) or the physical ethernet device (macvtap) and tries to capture packets with source or destination MAC address of the VM and learn from DHCP Offers, ARP traffic, or first-sent IPv4 packet what the IP address of the VM's interface is. This then allows to instantiate the network traffic filtering rules without the user having to provide the IP parameter somewhere in the filter description or in the interface description as a parameter. This only supports to detect the parameter IP, which is for the assumed single IPv4 address of a VM. There is not support for interfaces that may have multiple IP addresses (IP aliasing) or IPv6 that may then require more than one valid IP address to be detected. A VM can have multiple independent interfaces that each uses a different IP address and in that case it will be attempted to detect each one of the address independently. So, when for example an interface description in the domain XML has looked like this up to now: <interface type='bridge'> <source bridge='mybridge'/> <model type='virtio'/> <filterref filter='clean-traffic'> <parameter name='IP' value='10.2.3.4'/> </filterref> </interface> you may omit the IP parameter: <interface type='bridge'> <source bridge='mybridge'/> <model type='virtio'/> <filterref filter='clean-traffic'/> </interface> Internally I am walking the 'tree' of a VM's referenced network filters and determine with the given variables which variables are missing. Now, the above IP parameter may be missing and this causes a libvirt-internal thread to be started that uses the pcap library's API to listen to the backend interface (in case of macvtap to the physical interface) in an attempt to determine the missing IP parameter. If the backend interface disappears the thread terminates assuming the VM was brought down. In case of a macvtap device a timeout is being used to wait for packets from the given VM (filtering by VM's interface MAC address). If the VM's macvtap device disappeared the thread also terminates. In all other cases it tries to determine the IP address of the VM and will then apply the rules late on the given interface, which would have happened immediately if the IP parameter had been explicitly given. In case an error happens while the firewall rules are applied, the VM's backend interface is 'down'ed preventing it to communicate. Reasons for failure for applying the network firewall rules may that an ebtables/iptables command failes or OOM errors. Essentially the same failure reasons may occur as when the firewall rules are applied immediately on VM start, except that due to the late application of the filtering rules the VM now is already running and cannot be hindered anymore from starting. Bringing down the whole VM would probably be considered too drastic. While a VM's IP address is attempted to be determined only limited updates to network filters are allowed. In particular it is prevented that filters are modified in such a way that they would introduce new variables. A caveat: The algorithm does not know which one is the appropriate IP address of a VM. If the VM spoofs an IP address in its first ARP traffic or IPv4 packets its filtering rules will be instantiated for this IP address, thus 'locking' it to the found IP address. So, it's still 'safer' to explicitly provide the IP address of a VM's interface in the filter description if it is known beforehand. * configure.ac: detect libpcap * libvirt.spec.in: require libpcap[-devel] if qemu is built * src/internal.h: add the new ATTRIBUTE_PACKED define * src/Makefile.am src/libvirt_private.syms: add the new modules and symbols * src/nwfilter/nwfilter_learnipaddr.[ch]: new module being added * src/nwfilter/nwfilter_driver.c src/conf/nwfilter_conf.[ch] src/nwfilter/nwfilter_ebiptables_driver.[ch] src/nwfilter/nwfilter_gentech_driver.[ch]: plu the new functionality in * tests/nwfilterxml2xmltest: extend testing
-
由 Jim Meyering 提交于
* src/xen/xm_internal.c (xenXMDomainDefineXML): Remove useless and leak-inducing call to virGetDomain, as well as decl of now-unused local.
-
由 Jim Meyering 提交于
* src/storage/storage_backend.c (createRawFileOpHook): Remove dead stores and declaration of each stored-to variable.
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemudDomainGetSecurityLabel): Remove store and declaration.
-
由 Jiri Denemark 提交于
When comparing a CPU to host CPU, the result would be VIR_CPU_COMPARE_SUPERSET (or even VIR_CPU_COMPARE_INCOMPATIBLE if strict match was required) even though the two CPUs were identical.
-
由 Jiri Denemark 提交于
No change in semantics.
-
由 Jiri Denemark 提交于
There's no sense in advertising cpuselection capability when host CPU is not properly detected and advertised in host capabilities.
-
由 Jiri Denemark 提交于
When qemu libvirt driver doesn't support guest CPU selection with given qemu binary, guests requiring specific CPU should fail to start instead of being silently supplied with a default CPU.
-
由 Jiri Denemark 提交于
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Remove dead store into "snap", as well as its declaration.
-
- 07 4月, 2010 21 次提交
-
-
由 Eric Blake 提交于
git grep found 12 of the former but 100 of the latter in src/. * src/remote/remote_driver.c (initialise_gnutls): Rename... (initialize_gnutls): ...to this. (doRemoteOpen): Adjust caller. * src/xen/xen_driver.c (xenUnifiedOpen): Adjust output string. * src/util/network.c: Adjust comments. Suggested by Matthias Bolte.
-
由 Jim Meyering 提交于
* src/conf/domain_event.c (virDomainEventGraphicsNewFromDom): Return NULL when handling out-of-memory error, rather than falling through with ev=NULL and then assigning to ev->member. (virDomainEventGraphicsNewFromObj): Likewise.
-
由 Stefan Berger 提交于
The attached patch fixes a problem due to the mac match in iptables only supporting --mac-source and no --mac-destination, thus it not being symmetric. Therefore a rule like this one <rule action='drop' direction='out'> <all match='no' srcmacaddr='$MAC'/> </rule> should only have the MAC match on traffic leaving the VM and not test for the same source MAC address on traffic that the VM receives.
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemudStartVMDaemon): Initialize "logfile" to ensure that we don't use it uninitialized -- thus closing an arbitrary file descriptor -- in the cleanup block.
-
由 Daniel Veillard 提交于
-
由 Jamie Strandboge 提交于
* tests/virt-aa-helper-test: test augmented with hostdev and sdl display checks
-
由 Jamie Strandboge 提交于
* examples/apparmor/libvirt-qemu examples/apparmor/usr.sbin.libvirtd examples/apparmor/usr.lib.libvirt.virt-aa-helper: Update the examples
-
由 Jamie Strandboge 提交于
* src/security/virt-aa-helper.c: add support for SDL devices and 3 code cleanups
-
由 Jamie Strandboge 提交于
* src/security/virt-aa-helper.c: adjust virt-aa-helper to handle pci devices. Update valid_path() to have an override array to check against, and add "/sys/devices/pci" to it. Then rename file_iterate_cb() to file_iterate_hostdev_cb() and create file_iterate_pci_cb() based on it
-
由 Jamie Strandboge 提交于
adjust virt-aa-helper to handle backing store * src/security/virt-aa-helper.c: look for backing store metadata for disk definitions.
-
由 Jamie Strandboge 提交于
To avoid an error when hitting the <seclabel...> definition * src/security/virt-aa-helper.c: add VIR_DOMAIN_XML_INACTIVE flag to virDomainDefParseString
-
由 Jamie Strandboge 提交于
Don't exit with error if the user unloaded the profile outside of libvirt * src/security/virt-aa-helper.c: check the exit error from apparmor_parser before exiting with a failure
-
由 Jamie Strandboge 提交于
The calls to virExec() in security_apparmor.c when invoking virt-aa-helper use VIR_EXEC_CLEAR_CAPS. When compiled without libcap-ng, this is not a problem (it's effectively a no-op) but with libcap-ng this causes MAC_ADMIN to be cleared. MAC_ADMIN is needed by virt-aa-helper to manipulate apparmor profiles and without it VMs will not start[1]. This patch calls virExec with the default VIR_EXEC_NONE instead. * src/security/security_apparmor.c: fallback to VIR_EXEC_NONE flags for virExec of virt_aa_helper
-
由 Matthias Bolte 提交于
Reported by Paul Jenner
-
由 Eric Blake 提交于
Tested by running 'git submodule foreach git pull origin master' and 'git add .gnulib', then seeing that 'make clean' skips autogen although 'make' properly runs it. * cfg.mk (_clean_requested): New check, to speed up 'make clean' even if gnulib submodule is outdated. Suggested by Daniel P. Berrange.
-
由 Stefan Berger 提交于
Fixing the regular expressions for variables where the first letter must be a $.
-
由 Matthias Bolte 提交于
Also rename ReportError to macvtapError.
-
由 Matthias Bolte 提交于
-
由 Jim Meyering 提交于
* src/util/virterror.c (virErrorMsg): Insert missing "break;"
-
由 Matthias Bolte 提交于
Also define ESX_ERROR and ESX_VI_ERROR in a central place, instead of defining them in each source file. Add ESX_ERROR and ESX_VI_ERROR to the msg_gen_function list in cfg.mk. Update po/POTFILES.in accordingly.
-
由 Matthias Bolte 提交于
Add vboxError to the msg_gen_function list in cfg.mk.
-
- 06 4月, 2010 6 次提交
-
-
由 Stefan Berger 提交于
This patch adds a relaxng nwfilter schema along with a test that verifies all the test output XML against the schema. The input XMLs contain a lot of intentional out-of-range values that make them fail the schema verification, so I am not verifying against those.
-
由 Stefan Berger 提交于
With Eric Blake's suggestions applied. The following rule for direction 'in' <rule direction='in' action='drop'> <mac srcmacaddr='1:2:3:4:5:6'/> </rule> drops all traffic from the given mac address. The following rule for direction 'out' <rule direction='out' action='drop'> <mac dstmacaddr='1:2:3:4:5:6'/> </rule> drops all traffic to the given mac address. The following rule in direction 'inout' <rule direction='inout' action='drop'> <mac srcmacaddr='1:2:3:4:5:6'/> </rule> now drops all traffic from and to the given MAC address. So far it would have dropped traffic from the given MAC address and outgoing traffic with the given source MAC address, which is not useful since the packets will always have the VM's MAC address as source MAC address. The attached patch fixes this. This is the last bug I currently know of and want to fix.
-
由 Eric Blake 提交于
Document several missing commands. There's more work that could be done, but incremental improvements is better than no patch at all. * tools/virsh.pod (autostart, connect): Improve grammar. (create): Improve example. (domjobabort, domjobinfo, domxml-from-native, domxml-to-native): Document. (storage pool commands): New section.
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
and domainIsPersistent. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-