- 22 2月, 2019 1 次提交
-
-
由 Laine Stump 提交于
dnsmasq documentation says that the *IPv4* prefix/network address/broadcast address sent to dhcp clients will be automatically determined by dnsmasq by looking at the interface it's listening on, so the original libvirt code did not add a netmask to the dnsmasq commandline (or later, the dnsmasq conf file). For *IPv6* however, dnsmasq apparently cannot automatically determine the prefix (functionally the same as a netmask), and it must be explicitly provided in the conf file (as a part of the dhcp-range option). So many years after IPv4 DHCP support had been added, when IPv6 dhcp support was added the prefix was included at the end of the dhcp-range setting, but only for IPv6. A user had reported a bug on a host where one of the interfaces was a superset of the libvirt network where dhcp is needed (e.g., the host's ethernet is 10.0.0.20/8, and the libvirt network is 10.10.0.1/24). For some reason dnsmasq was supplying the netmask for the /8 network to clients requesting an address on the /24 interface. This seems like a bug in dnsmasq, but even if/when it gets fixed there, it looks like there is no harm in just always adding the netmask to all IPv4 dhcp-range options similar to how prefix is added to all IPv6 dhcp-range options. Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 02 2月, 2019 1 次提交
-
-
由 Laine Stump 提交于
Support for firewalld is a feature that can be selectively enabled or disabled (using --with-firewalld/--without-firewalld), not merely something that must be accounted for in the code if it is present with no exceptions. It is more consistent with other usage in libvirt to use WITH_FIREWALLD rather than HAVE_FIREWALLD. Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 01 2月, 2019 1 次提交
-
-
由 Casey Callendrello 提交于
This adds an additional directive to the dnsmasq configuration file that notifies clients via dhcp about the link's MTU. Guests can then choose adjust their link accordingly. Signed-off-by: NCasey Callendrello <cdc@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 29 1月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Allow the platform driver impls to run logic before and after the firewall reload process. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 26 1月, 2019 1 次提交
-
-
由 Laine Stump 提交于
networkMigrateStateFiles was added nearly 5 years ago when the network state directory was moved from /var/lib/libvirt to /var/run/libvirt just prior to libvirt-1.2.4). It was only required to maintain proper state information for networks that were active during an upgrade that didn't involve rebooting the host. At this point the likelyhood of anyone upgrading their libvirt from pre-1.2.4 directly to 5.0.0 or later *without rebooting the host* is probably so close to 0 that no properly informed bookie would take *any* odds on it happening, so it seems appropriate to remove this pointless code. Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 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>
-
- 20 9月, 2018 2 次提交
-
-
由 Erik Skultety 提交于
All of the ones being removed are pulled in by internal.h. The only exception is sanlock which expects the application to include <stdint.h> before sanlock's headers, because sanlock prototypes use fixed width int, but they don't include stdint.h themselves, so we have to leave that one in place. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Erik Skultety 提交于
It doesn't really make sense for us to have stdlib.h and string.h but not stdio.h in the internal.h header. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 9月, 2018 1 次提交
-
-
由 Shi Lei 提交于
Signed-off-by: NShi Lei <shi_lei@massclouds.com>
-
- 13 8月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
When starting network a macmap object is created (which stores MAC -> domain name mappings). However, if something goes wrong (e.g. virNetDevIPCheckIPv6Forwarding() fails) then the object is leaked. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 26 7月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1600468 If we are unable to read leases file (no matter what the reason is), we return 0 - just like if there were no leases. However, because we use virFileReadAll() an error is printed into the log. Note that not all networks have leases file - only those for which we start dnsmasq. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 7月, 2018 1 次提交
-
-
由 Shi Lei 提交于
With 'switch' we can utilize the compile time enum checks which we can't rely on with plain 'if' conditions. Signed-off-by: NShi Lei <shilei.massclouds@gmx.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 03 7月, 2018 1 次提交
-
-
由 Laine Stump 提交于
When libvirtd is restarted, it checks that each guest tap device is still attached to the bridge device that the configuration info says it should be connected to. If not, the tap will be disconnected from [wherever it is] and connected to [wherever it should be]. The previous code that did this did not account for: 1) the IFLA_MASTER attribute in a netdev's ifinfo will be set to "ovs-system" for any tap device connected to an OVS bridge, *not* to the name of the bridge it is attached to. 2) virNetDevRemovePort() only works for devices that are attached to a standard Linux host bridge. If a device is currently attached to an OVS bridge, then virNetDevOpenvswitchRemovePort() must be called instead. This patch remedies those problems, and adds a couple of information log messages to aid in debugging any future problem. Resolves: https://bugzilla.redhat.com/1596176Signed-off-by: NLaine Stump <laine@laine.org> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 6月, 2018 1 次提交
-
-
由 Anya Harter 提交于
And remove NULL checking from all callers. Signed-off-by: NAnya Harter <aharter@redhat.com>
-
- 11 5月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Rather than have virJSONValueArraySize return a -1 when the input is not an array and then splat an error message, let's check for an array before calling and then change the return to be a size_t instead of ssize_t. That means using the helper virJSONValueIsArray as well as using a more generic error message such as "Malformed <something> array". In some cases we can remove stack variables and when we cannot, those variables should be size_t not ssize_t. Alter a few references of if (!value) to be if (value == 0) instead as well. Some callers can already assume an array is being worked on based on the previous call, so there's less to do. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 5月, 2018 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 12 4月, 2018 3 次提交
-
-
由 Daniel P. Berrangé 提交于
Ensuring that we don't call the virDrvConnectOpen method with a NULL URI means that the drivers can drop various checks for NULL URIs. These were not needed anymore since the probe functionality was split Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Declare what URI schemes a driver supports in its virConnectDriver struct. This allows us to skip trying to open the driver entirely if the URI scheme doesn't match. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Add a localOnly flag to the virConnectDriver struct which allows a driver to indicate whether it is local-only, or permits remote connections. Stateful drivers running inside libvirtd are generally local only. This allows us to remote the check for uri->server != NULL from most drivers. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 01 4月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
QEMU is the preferred spelling used on QEMU website. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 19 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Now that we have the ability to easily open connections to secondary drivers, eg network:///system, it is possible to reimplement the virDomainNetResolveActualType method in terms of the public API. This avoids the need to have the network driver provide a callback for it. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 2月, 2018 4 次提交
-
-
由 Daniel P. Berrangé 提交于
Currently the QEMU driver will call directly into the network driver impl to modify resolve the atual type of NICs with type=network. It has todo this before it has allocated the actual NIC. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. This is a short term step, as it ought to be possible to achieve the same end goal by simply querying XML via the public network API. The QEMU code in question though, has no virConnectPtr conveniently available at this time. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The QEMU driver calls into the network driver to get the first IP address of the network. This information is readily available via the formal public API by fetching the XML doc and then parsing it. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Currently the QEMU driver will call directly into the network driver impl to modify network device bandwidth for interfaces with type=network. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Currently virt drivers will call directly into the network driver impl to allocate domain interface devices where type=network. This introduces a callback system to allow us to decouple the virt drivers from the network driver. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 01 2月, 2018 2 次提交
-
-
network:///systemnetwork:///session由 Daniel P. Berrangé 提交于
Allow the possibility of opening a connection to only the network driver, by defining network:///system and network:///session URIs and registering a fake hypervisor driver that supports them. The hypervisor drivers can now directly open a network driver connection at time of need, instead of having to pass around a virConnectPtr through many functions. This will facilitate the later change to support separate daemons for each driver. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
By convention the last thing in the driver.c files should be the driver callback table and function to register it. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 12月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
VM drivers may need to store additional private data to the status XML so that it can be restored after libvirtd restart. Since not everything is needed add a callback infrastructure, where VM drivers can add only stuff they need. Note that the private data is formatted as a <privateData> sub-element of the <disk> or <backingStore> <source> sub-element. This is done since storing it out of band (in the VM private data) would require a complex matching process to allow to put the data into correct place.
-
- 18 10月, 2017 1 次提交
-
-
由 Erik Skultety 提交于
There were a bunch of commentary blocks that were literally useless in terms of describing what the code following them does, since most of them were documenting "the obvious" or it just wouldn't help at all. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 05 10月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
Similarly to previous patch, for some types of interface domain and host are on the same side of RX/TX barrier. In that case, we need to set up the QoS differently. Well, swapped. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 17 8月, 2017 10 次提交
-
-
由 Michal Privoznik 提交于
Back in the day when I was implementing QoS for networks there were no self inflating virBitmaps. Only the static ones. Therefore, I had to allocate the whole 8KB of memory in order to keep track of used/unused class IDs. This is rather wasteful because nobody is ever gonna use that much classes (kernel overhead would drastically lower the bandwidth). Anyway, now that we have self inflating bitmaps we can start small and allocate more if there's need for it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
To be consistent with the API definition, use the @maxnames instead of @nnames when describing/comparing against the maximum names to be provided for the *ConnectList[Defined]Networks APIs. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation to privatize the virNetworkObj - create an accessor function to get the current @persistent value. Also change the value to a bool rather than an unsigned int (since that's how it's generated anyway). Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In order to privatize the virNetworkObj create accessors in virnetworkobj in order to handle the get/set of the active value. Also rather than an unsigned int, convert it to a boolean to match other drivers representation and the reality of what it is. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for privatizing the virNetworkObj structure, create accessors for the obj->autostart. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for making the object private, create a couple of API's to get the obj->def & obj->newDef and set the obj->def. While altering networkxml2conftest.c to use the virNetworkObjSetDef API, fix the name of the variable from @dev to @def Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for making the object private, create a couple of API's to get/set the obj->floor_sum. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for privatizing virNetworkObj, create accessor function to fetch the @classIdMap. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Change the variable name to be a bit more descriptive and less confusing when used with the data.network.actual->class_id. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for making the object private, create/use a couple of API's to get/set the obj->dnsmasqPid and obj->radvdPid. NB: Since the pid's can sometimes changed based on intervening functions, be sure to always fetch the latest value. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-