- 09 6月, 2009 15 次提交
-
-
由 Mark McLoughlin 提交于
Give static type checking a chance to catch errors. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
VLANClientState's fd_read() handler doesn't read from file descriptors, it adds a buffer to the client's receive queue. Re-name the handlers to make things a little less confusing. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
This, apparently, is the style we prefer - all VLANClientState should be an argument to qemu_new_vlan_client(). Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
Reduce the number of packets dropped under heavy network traffic by only reading a packet from the tapfd when a client can actually handle it. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
If a vlan client has no fd_can_read(), that means it can always receive packets. The current code assumes it can *never* receive packets. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
KVM uses a 64k buffer for reading from tapfd (for GSO support) and allocates the buffer with TAPState rather than on the stack. Not allocating it on the stack probably makes sense for qemu anyway, so merge it in advance of GSO support. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
Move portability clutter out into its own function. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Jan Kiszka 提交于
This patch reorders the initialization of slirp itself as well as its associated features smb and redirection. So far the first reference to slirp triggered the initialization, independent of the actual -net user option which may carry additional parameters. Now we save any request to add a smb export or some redirections until the actual initialization of the stack. This also allows to move a few parameters that were passed via global variable into the argument list of net_slirp_init. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Jan Kiszka 提交于
As host network devices can also be instantiated via the monitor, errors should then be reported to the related monitor instead of stderr. This requires larger refactoring, so this patch starts small with introducing a helper to catch both cases and convert net_client_init as well as net_slirp_redir. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
A small bit of confusion between buffers is causing errors like: qemu: invalid parameter '10' in 'script=/etc/qemu-ifup,fd=10' instead of: qemu: invalid parameter 'script' in 'script=/etc/qemu-ifup,fd=10' Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Jan Kiszka 提交于
OK, last try: 8e4416af broke -net socket, ffad4116 tried to fix it but broke error reporting of invalid parameters. So this patch widely reverts ffad4116 again and intead fixes those callers of check_params that originally suffered from overwritten buffers by using separate ones. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Mark McLoughlin 提交于
This reverts commit 8cf07dcb. This is a sorry saga. This commit: 8e4416af net: Add parameter checks for VLAN clients broken '-net socket' and this commit: ffad4116 net: Fix -net socket parameter checks fixed the problem but introduced another problem which this commit: 8cf07dcb Fix output of uninitialized strings fixed that final problem, but causing us to lose some error reporting information in the process. Meanwhile Jan posted a patch to mostly re-do ffad4116 in a way that fixes the original issue, but without losing the error reporting information. So, let's revert 8cf07dcb and apply Jan's patch. Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Jan Kiszka 提交于
Slirp uses fork_exec for spawning service processes, and QEMU uses this for running smbd. As SIGCHLD is not handled, these processes become zombies on termination. Fix this by installing a proper signal handler, but also make sure we disable the signal while waiting on forked network setup/shutdown scripts. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Jan Kiszka 提交于
Fix a race in qemu_send_packet when delivering deferred packets and add proper deferring also to qemu_sendv_packet. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
由 Jan Kiszka 提交于
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com>
-
- 28 5月, 2009 1 次提交
-
-
由 Alexander Graf 提交于
In case you're wondering what connections exactly you have open or maybe redir'ed in the past, you can't really find out from qemu right now. This patch enables you to see all current connections the host only networking holds open, so you can kill them using the previous patch. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 27 5月, 2009 2 次提交
-
-
由 Alexander Graf 提交于
Using the new host_net_redir command you can easily create redirections on the fly while your VM is running. While that's great, it's missing the removal of redirections, in case you want to have a port closed again at a later point in time. This patch adds support for removal of redirections. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Kevin Wolf 提交于
Commit ffad4116 removed the "scratch buffer" from check_params, but didn't care for the error messages which actually included this string to tell the user which option was wrong. Now this string is uninitialized, so this patch removes it from the message. This means that the user is only told the whole parameter string and has to pick the wrong option by himself as the callers of check_params can't know this value any more. An alternative approach would be to revert that commit and do whatever is needed to fix the original problem without changing check_params. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 22 5月, 2009 1 次提交
-
-
由 Jan Kiszka 提交于
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
-
- 04 5月, 2009 1 次提交
-
-
由 Paul Brook 提交于
Signed-off-by: NPaul Brook <paul@codesourcery.com>
-
- 01 5月, 2009 2 次提交
-
-
由 Jan Kiszka 提交于
My commit ea053add broke -net socket by overwriting an intermediate buffer in the added check_param. Fix this by switching check_param to automatic buffer allocation and release, ie. callers no longer have to worry about providing a scratch buffer. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jan Kiszka 提交于
>> + if (net_client_init(device, opts ? : "") < 0) { > > Is this a gcc extension? Do we want to introduce this construct to the > code base. Valid remark, fix below. Thanks, Jan --------> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 4月, 2009 1 次提交
-
-
由 Robert Reif 提交于
Fix net.c compile warning: CC net.o net.c: In function net_slirp_redir: net.c:623: warning: format not a string literal and no format arguments Signed-off-by: NRobert Reif <reif@earthlink.net>
-
- 22 4月, 2009 8 次提交
-
-
由 aliguori 提交于
The slirp stack is full of global variables which prevents instantiating it more than once. Catch this during net_slirp_init to prevent more harm later on. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7208 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
Allow to establish a TCP/UDP connection redirection also via a monitor command 'host_net_redir'. Moreover, assume TCP as connection type if that parameter is omitted. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7204 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
Queue packets that are send during an ongoing packet delivery. This ensures that packets will always arrive in their logical order at each client of a VLAN. Currently, slirp generates such immediate relies, and e.g. packet-sniffing clients on the same VLAN may get confused. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7203 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
Fix the documentation of the host_net_add monitor command and allow the user to pass no options at all. Moreover, inform the user on the monitor terminal if a request failed. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7201 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
This patch is derived from Tristan Gingold's patch. It adds a new VLAN client type that writes all traffic on the VLAN it is attached to into a pcap file. Such a file can then be analyzed offline with Wireshark or tcpdump. Besides rebasing and some minor cleanups, the major differences to the original version are: - support for enabling/disabling via the monitor (host_net_add/remove) - no special ordering of VLAN client list, qemu_send_packet now takes care of properly ordered packets - 64k default capturing limit (I hate tcpdump's default) Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7200 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
This aims at helping the user to find typos or other mistakes in parameter lists passed for VLAN client initialization. The existing parsing infrastructure does not allow a leaner approach, but this is better than nothing IMHO. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7197 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
In case no symbolic name is provided when requesting VLAN connection via listening TCP socket ('-net socket,listen=...'), qemu crashes. This fixes the cause. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7196 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
Make sure that we do not delete guest NICs via host_net_remove. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7195 c046a42c-6fe2-441c-8c8c-71466251a162
-
- 18 4月, 2009 5 次提交
-
-
由 aliguori 提交于
It's allocated using qemu_mallocz(), so ... The name and model strings are strdup() allocated, so free() is still appropriate for them. Reported-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMark McLoughlin <markmc@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7151 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
We're currently leaking memory and file descriptors on device hot-unplug. Signed-off-by: NMark McLoughlin <markmc@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
Now that we abort() on malloc, neither qemu_find_vlan() nor net_tap_fd_init() can fail. Signed-off-by: NMark McLoughlin <markmc@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7146 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
We weren't freeing the name string everywhere. Signed-off-by: NMark McLoughlin <markmc@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7144 c046a42c-6fe2-441c-8c8c-71466251a162
-
由 aliguori 提交于
struct iovec is now defined in qemu-common.h if needed, so we don't need the tap code to handle !defined(HAVE_IOVEC). Signed-off-by: NMark McLoughlin <markmc@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7143 c046a42c-6fe2-441c-8c8c-71466251a162
-
- 14 4月, 2009 1 次提交
-
-
由 blueswir1 提交于
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7103 c046a42c-6fe2-441c-8c8c-71466251a162
-
- 06 4月, 2009 1 次提交
-
-
由 blueswir1 提交于
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6984 c046a42c-6fe2-441c-8c8c-71466251a162
-
- 28 3月, 2009 1 次提交
-
-
由 aliguori 提交于
There is no need to check for valid prefixes on the the device name when removing it. If the device name is found on the vlan client list, it can be removed, regardless of the prefix used on its name. To reproduce the bug, just run this on the monitor: (qemu) host_net_add user name=foobar (qemu) host_net_remove 0 foobar invalid host network device foobar (qemu) Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6891 c046a42c-6fe2-441c-8c8c-71466251a162
-
- 09 3月, 2009 1 次提交
-
-
由 aliguori 提交于
We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so let's do it in OS_CFLAGS. Then, we can pepper in windows.h includes where using #includes that require it. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6783 c046a42c-6fe2-441c-8c8c-71466251a162
-