- 02 1月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
After 478ddedc a bug is fixed where we wrongly presumed loopack device name on non-Linux systems. It's lo0. However, the fix is not reflected in the tests which are failing now. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 12月, 2016 1 次提交
-
-
由 Jiri Denemark 提交于
Similarly to localOnly DNS domain, localPtr attribute can be used to tell the DNS server not to forward reverse lookups for unknown IPs which belong to the virtual network. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 06 12月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
Now that we have a module that's able to track <domain, mac addres list> pairs, hook it up into our network driver. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In dd7bfb2c I've removed locking of the network driver upon it's allocation. However, I forgot to remove one location of the driver unlock. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 11月, 2016 1 次提交
-
-
由 Pavel Timofeev 提交于
On BSD family OSes (Free/Net/Open/DragonFlyBSD, Mac OS) and Solaris loopback interface is called 'lo0' instead of just 'lo'.
-
- 29 10月, 2016 1 次提交
-
-
由 Laine Stump 提交于
commit 9065cfaa added the ability to disable DNS services for a libvirt virtual network. If neither DNS nor DHCP is needed for a network, then we don't need to start dnsmasq, so code was added to check for this. Unfortunately, it was written with a great lack of attention to detail (I can say that, because I was the author), and the loop that checked if DHCP is needed for the network would never end if the network had multiple IP addresses and the first <ip> had no <dhcp> subelement (which would have contained a <range> or <host> subelement, thus requiring DHCP services). This patch rewrites the check to be more compact and (more importantly) finite. This bug was present in release 2.2.0 and 2.3.0, so will need to be backported to any relevant maintainence branches. Reported here: https://www.redhat.com/archives/libvirt-users/2016-October/msg00032.html https://www.redhat.com/archives/libvirt-users/2016-October/msg00045.html
-
- 20 10月, 2016 1 次提交
-
-
由 Sławek Kapłoński 提交于
New line character in name of network is now forbidden because it mess virsh output and can be confusing for users. Validation of name is done in network driver, after parsing XML to avoid problems with disappeared network which was already created with new-line char in name. Closes-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=818064Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 10月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
This way we get reference counting and we can get rid of locking function. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 10月, 2016 1 次提交
-
-
由 Martin Wilck 提交于
The dnsmasq man page recommends that dhcp-authoritative "should be set when dnsmasq is definitely the only DHCP server on a network". This is the case for libvirt-managed virtual networks. The effect of this is that VMs that fail to renew their DHCP lease in time (e.g. if the VM or host is suspended) will be able to re-acquire the lease even if it's expired, unless the IP address has been taken by some other host. This avoids various annoyances caused by changing VM IP addresses.
-
- 23 8月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Commit id '0b6336c2' formatted the 'addr', but didn't VIR_FREE it. Found by Coverity.
-
- 20 8月, 2016 3 次提交
-
-
由 Laine Stump 提交于
For some unknown reason the original implementation of the <forwarder> element only took advantage of part of the functionality in the dnsmasq feature it exposes - it allowed specifying the ip address of a DNS server which *all* DNS requests would be forwarded to, like this: <forwarder addr='192.168.123.25'/> This is a frontend for dnsmasq's "server" option, which also allows you to specify a domain that must be matched in order for a request to be forwarded to a particular server. This patch adds support for specifying the domain. For example: <forwarder domain='example.com' addr='192.168.1.1'/> <forwarder domain='www.example.com'/> <forwarder domain='travesty.org' addr='10.0.0.1'/> would forward requests for bob.example.com, ftp.example.com and joe.corp.example.com all to the DNS server at 192.168.1.1, but would forward requests for travesty.org and www.travesty.org to 10.0.0.1. And due to the second line, requests for www.example.com, and odd.www.example.com would be resolved by the libvirt network's own DNS server (i.e. thery wouldn't be immediately forwarded) even though they also match 'example.com' - the match is given to the entry with the longest matching domain. DNS requests not matching any of the entries would be resolved by the libvirt network's own DNS server. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1331796
-
由 Laine Stump 提交于
If you define a libvirt virtual network with one or more IP addresses, it starts up an instance of dnsmasq. It's always been possible to avoid dnsmasq's dhcp server (simply don't include a <dhcp> element), but until now it wasn't possible to avoid having the DNS server listening; even if the network has no <dns> element, it is started using default settings. This patch adds a new attribute to <dns>: enable='yes|no'. For backward compatibility, it defaults to 'yes', but if you don't want a DNS server created for the network, you can simply add: <dns enable='no'/> to the network configuration, and next time the network is started there will be no dns server created (if there is dhcp configuration, dnsmasq will be started with "port=0" which disables the DNS server; if there is no dhcp configuration, dnsmasq won't be started at all).
-
由 Laine Stump 提交于
The new forward mode 'open' is just like mode='route', except that no firewall rules are added to assure that any traffic does or doesn't pass. It is assumed that either they aren't necessary, or they will be setup outside the scope of libvirt. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=846810
-
- 27 7月, 2016 1 次提交
-
-
由 Anton Khramov 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1181539
-
- 13 7月, 2016 1 次提交
-
-
由 Maxim Perevedentsev 提交于
IPv6 RA always contains an implicit default route via the link-local address of the source of RA. This forces the guest to install a route via isolated network, which may disturb the guest's networking in case of multiple interfaces. More info in 013427e6. The validity of this route is controlled by "default [route] lifetime" field of RA. If the lifetime is set to 0 seconds, then no route is installed by receiver. dnsmasq 2.67+ supports "ra-param=<interface>,<RA interval>,<default lifetime>" option. We pass "ra-param=*,0,0" (here, RA_interval=0 means default) to disable default gateway in RA for isolated networks.
-
- 27 6月, 2016 3 次提交
-
-
由 Laine Stump 提交于
These functions all need to be called from a utility function that must be located in the util directory, so we move them all into util/virnetdevip.[ch] now that it exists. Function and struct names were appropriately changed for the new location, but all code is unchanged aside from motion and renaming.
-
由 Laine Stump 提交于
This patch splits virnetdev.[ch] into multiple files, with the new virnetdevip.[ch] containing all the functions related to setting and retrieving IP-related info for a device (both addresses and routes).
-
由 Laine Stump 提交于
I'm tired of mistyping this all the time, so let's do it the same all the time (similar to how we changed all "Pci" to "PCI" awhile back). (NB: I've left alone some things in the esx and vbox drivers because I'm unable to compile them and they weren't obviously *not* a part of some API. I also didn't change a couple of variables named, e.g. "somethingIptables", because they were derived from the name of the "iptables" command)
-
- 24 6月, 2016 3 次提交
- 01 6月, 2016 1 次提交
-
-
由 Laine Stump 提交于
Although dns host records are stored in a separate configuration file that is reread by dnsmasq when it receives a SIGHUP, the txt and srv records are directly in the dnsmasq .conf file which can't be reread after initial dnsmasq startup. This means that if an srv or txt record is modified in a network config, libvirt needs to restart the dnsmasq process rather than just sending a SIGHUP. This was pointed out in a question in https://bugzilla.redhat.com/show_bug.cgi?id=988718 , but no separate BZ was filed.
-
- 13 5月, 2016 1 次提交
-
-
由 Laine Stump 提交于
This would previously be silently ignored. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1319044
-
- 11 5月, 2016 1 次提交
-
-
由 Laine Stump 提交于
SRIOV VFs used in macvtap passthrough mode can take advantage of the SRIOV card's transparent vlan tagging. All the code was there to set the vlan tag, and it has been used for SRIOV VFs used for hostdev interfaces for several years, but for some reason, the vlan tag for macvtap passthrough devices was stubbed out with a -1. This patch moves a bit of common validation down to a lower level (virNetDevReplaceNetConfig()) so it is shared by hostdev and macvtap modes, and updates the macvtap caller to actually send the vlan config instead of -1.
-
- 10 5月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Both instances use VIR_WARN() to print the error from a failed virDBusGetSystemBus() call. Rather than use the virGetLastError and need to check for valid return err pointer, just use the virGetLastErrorMessage. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 02 5月, 2016 2 次提交
-
-
由 Cole Robinson 提交于
We will segfault of a daemon reload picks up a new network config that needs to be autostarted. We shouldn't be passing NULL for network_driver here. This seems like it was missed in the larger rework in commit 1009a61e
-
由 Martin Kletzander 提交于
We had both and the only difference was that the latter also included information about multifunction setting. The problem with that was that we couldn't use functions made for only one of the structs (e.g. parsing). To consolidate those two structs, use the one in virpci.h, include that in domain_conf.h and add the multifunction member in it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 22 4月, 2016 1 次提交
-
-
由 Laine Stump 提交于
According to the dnsmasq manpage, the netmask for IPv4 address ranges will be auto-deteremined from the interface dnsmasq is listening on, but it can't do this for IPv6 for some reason - it instead assumes a network prefix of 64 for all IPv6 address ranges. If this is incorrect, dnsmasq will refuse to give out an address to clients, instead logging this message: dnsmasq-dhcp[2380]: no address range available for DHCPv6 request via virbr0 The solution is for libvirt to add ",$prefix" to all IPv6 dhcp-range arguments when building the dnsmasq.conf file. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1033739
-
- 08 4月, 2016 1 次提交
-
-
由 Vasiliy Tolstov 提交于
Signed-off-by: NVasiliy Tolstov <v.tolstov@selfip.ru>
-
- 04 4月, 2016 1 次提交
-
-
由 Laine Stump 提交于
There are times when it's necessary to learn the actual type of a network connection before any resources have been allocated (e.g. during qemuProcessPrepareDomain()), but in the past it was necessary to call networkAllocateActualDevice() in order to have the actual type filled in. This new function returns the type of network that *will be* setup once it actually happens, but without making any changes on the host.
-
- 26 3月, 2016 2 次提交
-
-
由 Laine Stump 提交于
networkStartNetwork() and networkShutdownNetwork() were calling the wrong type-specific function in the case of networks that were configured for macvtap ("direct") bridge mode - they were instead calling the functions for a tap+bridge network. Currently none of these functions does anything (they just return 0) so it hasn't created any problems, but that could change in the future.
-
由 Laine Stump 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1316465 An attempt to simplify the code for the VIR_NETWORK_FORWARD_BRIDGE case of networkUpdateState in commit b61db335 (first in release 1.2.14) resulted in networks based on macvtap bridge mode being erroneously marked as inactive any time libvirtd was restarted. The problem is that the original code had differentiated between a network using tap devices to connect to an existing host-bridge device (forward mode of VIR_NETWORK_FORWARD_BRIDGE and a non-NULL def->bridge), and one using macvtap bridge mode to connect to any ethernet device (still forward mode VIR_NETWORK_FORWARD_BRIDGE, but null def->bridge), but the changed code assumed that all networks with VIR_NETWORK_FORWARD_BRIDGE were tap + host-bridge networks, so a null def->bridge was interpreted as "inactive". This patch restores the original code in networkUpdateState
-
- 18 3月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
We include the file in plenty of places. This is mostly due to historical reasons. The only place that needs something from the header file is storage_backend_fs which opens _PATH_MOUNTED. But it gets the file included indirectly via mntent.h. At no other place in our code we need _PATH_.*. Drop the include and configure check then. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 3月, 2016 1 次提交
-
-
由 Shanzhi Yu 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1315059Signed-off-by: NShanzhi Yu <shyu@redhat.com>
-
- 15 2月, 2016 2 次提交
-
-
由 Laine Stump 提交于
There are three functions that deal with allocating and freeing devices from a networks netdev/pci device pool: network(Allocate|Notify|Release)ActualDevice(). These functions also maintain a counter of the number of domains currently using a network (regardless of whether or not that network uses a device pool). Each of these functions had multiple log messages (output using VIR_DEBUG) that were in slightly different formats and gave varying amounts of information. This patch creates a single function to log the pertinent information in a consistent manner for all three of these functions. Along with assuring that all the functions produce a consistent form of output (and making it simpler to change), it adds the MAC address of the domain interface involved in the operation, making it possible to verify which interface of which domain the operation is being done for (assuming that all MAC addresses are unique, of course). All of these messages are raised from DEBUG to INFO, since they don't happen that often (once per interface per domain/libvirtd start or domain stop), and can be very informative and helpful - eliminating the need to log debug level messages makes it much easier to sort these out.
-
由 Laine Stump 提交于
networkReleaseActualDevice() and networkNotifyActualDevice() both were updating the individual devices' connections count in two separate places (unlike networkAllocateActualDevice() which does it in a single unified place after success:). The code is correct, but prone to confusion / later breakage. All of these updates are anyway located at the end of if/else clauses that are (with the exception of a single VIR_DEBUG() in each case) immediately followed by the success: label anyway, so this patch replaces the duplicated ++/-- instructions with a single ++/-- inside a qualifying "if (dev)" down below success:. (NB: if dev != NULL, by definition we are using a device (either pci or netdev, doesn't matter for these purposes) from the network's pool) The VIR_DEBUG args (which will be replaced in a followup patch anyway) were all adjusted to account for the connection count being out of date at the time.
-
- 04 2月, 2016 1 次提交
-
-
由 Joao Martins 提交于
And use the newly added caps->host.netprefix (if it exists) for interface names that match the autogenerated target names. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 03 12月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
Instead of comparing garbage strings against real MAC addresses, introduce an error mesage for unparsable ones: $ virsh net-dhcp-leases default --mac t12 error: Failed to get leases info for default error: invalid MAC address: t12 https://bugzilla.redhat.com/show_bug.cgi?id=1261432
-
- 25 11月, 2015 1 次提交
-
-
由 Laine Stump 提交于
A PCI device may have the capability to setup virtual functions (VFs) but have them currently all disabled. Prior to this patch, if that was the case the the node device XML for the device wouldn't report any virtual_functions capability. With this patch, if a file called "sriov_totalvfs" is found in the device's sysfs directory, its contents will be interpreted as a decimal number, and that value will be reported as "maxCount" in a capability element of the device's XML, e.g.: <capability type='virtual_functions' maxCount='7'/> This will be reported regardless of whether or not any VFs are currently enabled for the device. NB: sriov_numvfs (the number of VFs currently active) is also available in sysfs, but that value is implied by the number of items in the list that is inside the capability element, so there is no reason to explicitly provide it as an attribute. sriov_totalvfs and sriov_numvfs are available in kernels at least as far back as the 2.6.32 that is in RHEL6.7, but in the case that they simply aren't there, libvirt will behave as it did prior to this patch - no maxCount will be displayed, and the virtual_functions capability will be absent from the device's XML when 0 VFs are enabled.
-
- 29 10月, 2015 1 次提交
-
-
由 Maxim Perevedentsev 提交于
commit db488c79 assumed that dnsmasq would complete IPv6 DAD before daemonizing, but in reality it doesn't wait, which creates problems when libvirt's bridge driver sets the matching "dummy tap device" to IFF_DOWN prior to DAD completing. This patch waits for DAD completion by periodically polling the kernel using netlink to check whether there are any IPv6 addresses assigned to bridge which have a 'tentative' state (if there are any in this state, then DAD hasn't yet finished). After DAD is finished, execution continues. To avoid an endless hang in case something was wrong with the kernel's DAD, we wait a maximum of 5 seconds.
-