- 14 6月, 2013 1 次提交
-
-
由 Roman Bogorodskiy 提交于
-
- 24 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 14 5月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Currently we report a bogus error message when macvlan creation fails: error: Failed to start domain migtest error: operation failed: Unable to create macvlan device With this removed, we see the real error: error: Failed to start domain migtest error: Unable to get index for interface p31p1: No such device Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 08 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virNetlinkCommand() method takes an 'unsigned char **' parameter to be filled with the received netlink message. The callers then immediately cast this to 'struct nlmsghdr', triggering (bogus) warnings about increasing alignment requirements util/virnetdev.c: In function 'virNetDevLinkDump': util/virnetdev.c:1300:12: warning: cast increases required alignment of target type [-Wcast-align] resp = (struct nlmsghdr *)*recvbuf; ^ util/virnetdev.c: In function 'virNetDevSetVfConfig': util/virnetdev.c:1429:12: warning: cast increases required alignment of target type [-Wcast-align] resp = (struct nlmsghdr *)recvbuf; Since all callers cast to 'struct nlmsghdr' we can avoid the warning problem entirely by simply changing the signature of virNetlinkCommand to return a 'struct nlmsghdr **' instead of 'unsigned char **'. The way we do the cast inside virNetlinkCommand does not have any alignment issues. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 4月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Format the address using the helper instead of having similar code in multiple places. This patch also fixes leak of the MAC address string in ebtablesRemoveForwardAllowIn() and ebtablesAddForwardAllowIn() in src/util/virebtables.c
-
- 01 3月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, after we removed the qemu driver lock, it may happen that two or more threads will start up a machine with macvlan and race over virNetDevMacVLanCreateWithVPortProfile(). However, there's a racy section in which we are generating a sequence of possible device names and detecting if they exits. If we found one which doesn't we try to create a device with that name. However, the other thread is doing just the same. Assume it will succeed and we must therefore fail. If this happens more than 5 times (which in massive parallel startup surely will) we return -1 without any error reported. This patch is a simple hack to both of these problems. It introduces a mutex, so only one thread will enter the section, and if it runs out of possibilities, error is reported. Moreover, the number of retries is raised to 20.
-
- 21 12月, 2012 5 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 12 12月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
These classes can borrow unused bandwidth. Basically, only egress qdsics can have classes, therefore we can do this kind of traffic shaping only on host's outgoing, that is domain's incoming traffic.
-
- 28 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
When failing to create a macvlan interface, make sure the error message contains the name of the host interface Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 22 8月, 2012 1 次提交
-
-
由 Tang Chen 提交于
This patch improve all the API in virnetlink.c to support all kinds of netlink protocols, and make all netlink sockets be able to join in groups. Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com>
-
- 23 7月, 2012 1 次提交
-
-
由 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
-
- 18 7月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
This removes nearly all the per-file error reporting macros from the code in src/util/. A few custom macros remain for the case, where the file needs to report errors with a variety of different codes or parameters Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 17 7月, 2012 1 次提交
-
-
由 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.
-
- 08 5月, 2012 1 次提交
-
-
由 Laine Stump 提交于
Until now, virNetlinkCommand has assumed that the nl_pid in the source address of outgoing netlink messages should always be the return value of getpid(). In most cases it actually doesn't matter, but in the case of communication with lldpad, lldpad saves this info and later uses it to send netlink messages back to libvirt. A recent patch to fix Bug 816465 changed the order of the universe such that the netlink event service socket is no longer bound with nl_pid == getpid(), so lldpad could no longer send unsolicited messages to libvirtd. Adding src_pid as an argument to virNetlinkCommand() is the first step in notifying lldpad of the proper address of the netlink event service socket.
-
- 27 4月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
Below patch fixes the following coverity findings Error: OVERRUN_STATIC: /libvirt/src/qemu/qemu_command.c:152: overrun-buffer-val: Overrunning static array "net->mac" of size 6 bytes by passing it as an argument to a function which indexes it at byte position 15. /libvirt/src/util/virnetdevmacvlan.c:948: access_dbuff_const: Calling "virNetDevMacVLanVPortProfileRegisterCallback" indexes array "macaddress" at byte position 15. /libvirt/src/util/virnetdevmacvlan.c:773: access_dbuff_const: Calling "memcpy" indexes array "macaddress" with index "16UL" at byte position 15. Error: OVERRUN_STATIC: /libvirt/src/qemu/qemu_migration.c:2744: overrun-buffer-val: Overrunning static array "net->mac" of size 6 bytes by passing it as an argument to a function which indexes it at byte position 15. /libvirt/src/util/virnetdevmacvlan.c:773: access_dbuff_const: Calling "memcpy" indexes array "macaddress" with index "16UL" at byte position 15. Error: OVERRUN_STATIC: /libvirt/src/qemu/qemu_driver.c:435: overrun-buffer-val: Overrunning static array "net->mac" of size 6 bytes by passing it as an argument to a function which indexes it at byte position 15. /libvirt/src/util/virnetdevmacvlan.c:1036: access_dbuff_const: Calling "virNetDevMacVLanVPortProfileRegisterCallback" indexes array "macaddress" at byte position 15. /libvirt/src/util/virnetdevmacvlan.c:773: access_dbuff_const: Calling "memcpy" indexes array "macaddress" with index "16UL" at byte position 15.
-
- 25 4月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
Use embedded buffers for the MAC addresses and the VM's UUID.
-
- 18 4月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
Currently upon a migration a callback is created when a 802.1qbg link is set to PREASSOCIATE, this should not happen because this is a no-op on most switches, and does not lead to an ASSOCIATE state. This patch only creates callbacks when CREATE or RESTORE is requested. Migration and libvirtd restart scenarios are already handled elsewhere. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 13 4月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
This patch adds a netlink callback when migrating a VEPA enabled virtual machine. It fixes a Bug where a VM would not request a port association when it was cleared by lldpad. This patch requires the latest git version of lldpad to work. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 30 3月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The code is splattered with a mix of sizeof foo sizeof (foo) sizeof(foo) Standardize on sizeof(foo) and add a syntax check rule to enforce it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 3月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
When libvirtd is restarted, also restart the netlink event message callbacks for existing VEPA connections and send a message to lldpad for these existing links, so it learns the new libvirtd pid. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 09 3月, 2012 1 次提交
-
-
由 Laine Stump 提交于
There are several functions that call virNetlinkCommand, and they all follow a common pattern, with three exit labels: err_exit (or cleanup), malformed_resp, and buffer_too_small. All three of these labels do their own cleanup and have their own return. However, the malformed_resp label usually frees the same items as the cleanup/err_exit label, and the buffer_too_small label just doesn't free recvbuf (because it's known to always be NULL at the time we goto buffer_too_small. In order to simplify and standardize the code, I've made the following changes to all of these functions: 1) err_exit is replaced with the more libvirt-ish "cleanup", which makes sense because in all cases this code is also executed in the case of success, so labelling it err_exit may be confusing. 2) rc is initialized to -1, and set to 0 just before the cleanup label. Any code that currently sets rc = -1 is made to instead goto cleanup. 3) malformed_resp and buffer_too_small just log their error and goto cleanup. This gives us a single return path, and a single place to free up resources. 4) In one instance, rather then logging an error immediately, a char* msg was pointed to an error string, then goto cleanup (and cleanup would log an error if msg != NULL). It takes no more lines of code to just log the message as we encounter it. This patch should have 0 functional effects.
-
- 06 3月, 2012 2 次提交
-
-
由 Roopa Prabhu 提交于
This patch includes the following changes to virnetdevmacvlan.c and virnetdevvportprofile.c: - removes some netlink functions which are now available in virnetdev.c - Adds a vf argument to all port profile functions. For 802.1Qbh devices, the port profile calls can use a vf argument if passed by the caller. If the vf argument is -1 it will try to derive the vf if the device passed is a virtual function. For 802.1Qbg devices, This patch introduces a null check for the device argument because during port profile assignment on a hostdev, this argument can be null. Signed-off-by: NRoopa Prabhu <roprabhu@cisco.com>
-
由 Laine Stump 提交于
Commit 723d5c (added after the release of 0.9.10) adds a NetlinkEventClient for each interface sent to virNetDevMacVLanCreateWithVPortProfile. This should only be done if the interface actually *has* a virtPortProfile, otherwise the event handler would be a NOP. The bigger problem is that part of the setup to create the NetlinkEventClient is to do a memcpy of virtPortProfile - if it's NULL, this triggers a segv. This patch just qualifies the code that adds the client - if virtPortProfile is NULL, it's skipped.
-
- 29 2月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
Add de-association handling for 802.1qbg (vepa) via lldpad netlink messages. Also adds the possibility to perform an association request without waiting for a confirmation. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 04 2月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
Rename the src/util/netlink files to src/util/virnetlink to better fit the naming scheme. Also rename nlComm to virNetlinkCommand. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 28 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Move the virMacAddrXXX functions out of util.[ch] and into a new dedicate file virmacaddr.[ch]
-
- 01 12月, 2011 1 次提交
-
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 90074ecf. Signed-off-by: NAlex Jia <ajia@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 19 11月, 2011 6 次提交
-
-
由 Eric Blake 提交于
Since commit 6ec8288a, compilation has failed on RHEL 5: util/virnetdevmacvlan.c:672: error: conflicting types for 'virNetDevMacVLanCreateWithVPortProfile' * src/util/virnetdevmacvlan.c (virNetDevMacVLanCreateWithVPortProfile): Add missing parameter.
-
由 Daniel P. Berrange 提交于
Update virNetDevMacVLanCreateWithVPortProfile to allow creation of plain macvlan devices, as well as macvtap devices. The former is useful for LXC containers * src/qemu/qemu_command.c: Explicitly request a macvtap device * src/util/virnetdevmacvlan.c, src/util/virnetdevmacvlan.h: Add new flag to allow switching between macvlan and macvtap creation
-
由 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
-
由 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
-
由 Daniel P. Berrange 提交于
Rename ifaceReplaceMacAddress to virNetDevReplaceMacAddress and ifaceRestoreMacAddress to virNetDevRestoreMacAddress. * util/interface.c, util/interface.h, util/virnetdevmacvlan.c: Rename APIs
-
由 Daniel P. Berrange 提交于
Move the low level macvlan creation APIs into the virnetdevmacvlan.c file where they more naturally belong * util/interface.c, util/interface.h: Remove virNetDevMacVLanCreate and virNetDevMacVLanDelete * util/virnetdevmacvlan.c, util/virnetdevmacvlan.h: Add virNetDevMacVLanCreate and virNetDevMacVLanDelete
-