- Oct 21, 2011
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 28, 2011
-
-
Thomas Huth authored
The two new variables "arp_requested" and "expiration_date" in the mbuf structure have been added after the variable-sized "m_dat_" array. The variables have to be added before the m_dat_ array instead. Without this patch, the expiration_date gets clobbered by code that accesses the m_dat_ array. I experienced this problem with the code in slirp/tftp.c: The tftp_send_data() function created a new packet with the m_get() function (which fills-in a default expiration_date value). Then the TFTP code cleared the data section of the packet, which accidentially also cleared the expiration_date. This zeroed expiration_date then finally causes the packet to be discarded during if_start(), so that TFTP packets were not transmitted anymore. [Jan: added comment as suggested by Fabien ] CC: Fabien Chouteau <chouteau@adacore.com> Signed-off-by:
Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
ti points into the m buffer. But the latter may already be released right after the dodata: label. Move the test before the potential release. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Sep 16, 2011
-
-
Stefan Weil authored
Those blanks violate the coding conventions, see scripts/checkpatch.pl. Blanks missing after colons in the changed lines were added. This patch does not try to fix tabs, long lines and other problems in the changed lines, therefore checkpatch.pl reports many violations. Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Sep 15, 2011
-
-
Jan Kiszka authored
This ensures we can cleanly signal the drop in case the connection timer fires. So far we sent those frames to nowhere (target IP 0.0.0.0). Found by the new assertion on invalid IPs in arp_table_search. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Sep 09, 2011
-
-
Stefan Weil authored
* qemu-common.h is not a system include file, so it should be included with "" instead of <>. Otherwise incremental builds might fail because only local include files are checked for changes. * linux-user/syscall.c included the file twice. Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Jan Kiszka <jan.kiszka@siemens.com> Acked-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- Sep 03, 2011
-
-
Stefan Weil authored
Most changes were made using these commands: git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/' Whitespace in linux-user/syscall_defs.h was fixed manually to avoid warnings from scripts/checkpatch.pl. Manual changes were also applied to hw/pc.c. I did not fix indentation with tabs in block/vvfat.c. The patch will show 4 errors with scripts/checkpatch.pl. Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Aug 22, 2011
-
-
Anthony Liguori authored
Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Aug 21, 2011
-
-
Anthony Liguori authored
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Aug 15, 2011
-
-
Jan Kiszka authored
-mms-bitfields prevents that the bitfields in current IP header structs are packed into a single byte as it is required. Fix this by using uint8_t as backing type. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Aug 05, 2011
-
-
Jan Kiszka authored
The expiration timeout must only affect packets that are queued due to pending ARP resolutions. The old version broke ping e.g. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
No need to update the current time for each packet we send from the queue. Processing time is comparably short. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Should be uint32_t for IPv4, not int. Also avoid in_addr_t without proper includes. Fixes build regression on mingw32. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Aug 03, 2011
-
-
Fabien Chouteau authored
In the current implementation, if Slirp tries to send an IP packet to a client with an unknown hardware address, the packet is simply dropped and an ARP request is sent (if_encap in slirp/slirp.c). With this patch, Slirp will send the ARP request, re-queue the packet and try to send it later. The packet is dropped after one second if the ARP reply is not received. Signed-off-by:
Fabien Chouteau <chouteau@adacore.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Fabien Chouteau authored
This patch adds a simple ARP table in Slirp and also adds handling of gratuitous ARP requests. Signed-off-by:
Fabien Chouteau <chouteau@adacore.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- Jul 27, 2011
-
-
Stefan Weil authored
cppcheck detected two rather strange comments which were not correctly written as C comments. They did not cause any harm because they were framed by #ifdef notdef ... #endif, so they were never compiled. Fix them nevertheless (we could also remove the unused code). Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- Jul 25, 2011
-
-
Blue Swirl authored
Avoid warnings like these by wrapping recv(): CC slirp/ip_icmp.o /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive': /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror] /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *' Remove also casts used to avoid warnings. Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jul 23, 2011
-
-
Jan Kiszka authored
Linux 3.0 gained support for unprivileged ICMP ping sockets. Use this feature to forward guest pings to the outer world. The host admin has to set the ping_group_range in order to grant access to those sockets. To allow ping for the users group (GID 100): echo 100 100 > /proc/sys/net/ipv4/ping_group_range Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Jan Kiszka authored
Recent smb daemons tend to terminate themselves via a process group SIGTERM. If the daemon is still in qemu's group by that time, qemu will die as well. Avoid this by always pushing fork_exec processes into a group of their own, not just (unused) type 2 execs. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Jan Kiszka authored
Remove this pointless wrapping. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Jan Kiszka authored
Instead of accepting every DHCP/BOOTP and TFTP packet, only invoke the built-in servers if the target is the virtual host. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Jan Kiszka authored
This aligns the code to what the documentation claims: Allow everything but requests that would have to be routed outside of the virtual LAN. So we need to drop the unneeded IP-level filter, allow TFTP requests, and add the missing protocol-level filter to ICMP. CC: Gleb Natapov <gleb@redhat.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Mar 29, 2011
-
-
Paolo Bonzini authored
SLIRP -smb support wants to fork a process and forget about reaping it. To please it, add a generic service to register a process id and let QEMU reap it. In the future it could be enhanced to pass a status, but this would be unused. With this in place, the SIGCHLD signal handler would not stomp on pclose anymore. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Mar 21, 2011
-
-
Paolo Bonzini authored
This was done with: sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \ $(git grep -l 'get_clock\>.*rt_clock' ) sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \ $(git grep -l 'new_timer\>.*rt_clock' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 05, 2011
-
-
Vincent Palatin authored
make the code compile correctly when DEBUG is activated. Signed-off-by:
Vincent Palatin <vpalatin@chromium.org> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Feb 25, 2011
-
-
Stefan Weil authored
x.tp_buf was declared as a uint8_t array, but always used as a char array (which needed a lot of type casts). The patch includes these changes: * Fix declaration of x.tp_buf and remove all type casts. * Use offsetof() to get the offset of x.tp_buf. Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Feb 14, 2011
-
-
Anthony Liguori authored
I unfortunately got on an unnamed branch and pushed the wrong bits Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Bruce Rogers authored
Since the addition of the slirp member to struct mbuf, the value of SLIRP_MSIZE and the initialization of m_size have not been correct, resulting in overrunning the end of the malloc'd buffer in some cases. Signed-off-by:
Bruce Rogers <brogers@novell.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Jan 23, 2011
-
-
Blue Swirl authored
'extern' qualifier is useless for function declarations. Delete them. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jan 13, 2011
-
-
Sergei Gavrikov authored
According to RFC 1350 (TFTP Revision 2) the mode field can contain any combination of upper and lower case; also RFC 2349 propagates that the transfer size option ("tsize") is case in-sensitive too. Current implementation of embedded TFTP server missed that what does mess some TFTP clients. Fixed by using STRCASECMP(3) in the required places. Signed-off-by:
Sergei Gavrikov <sergei.gavrikov@gmail.com> Reviewed-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Edgar E. Iglesias <edgar@axis.com>
-
- Jan 10, 2011
-
-
Aurelien Jarno authored
Slirp code tries to be smart an avoid data copy by using pointer to the data. This solution leads to unaligned access, in this case preq_addr, which is a 32-bit long structure. There is no real point of avoiding data copy in a such case, as the value itself is smaller or the same size as a pointer. The patch replaces pointers to the preq_addr structure by the strcture itself, and use the address 0.0.0.0 if no address has been requested (this is not a valid address in such a request). It compares it with htonl(0L) for correctness reasons, in case a code checker look for such mistakes. It also uses memcpy() for copying the data, which takes care of alignement issues. This fixes an unaligned access on IA64 host while requesting a DHCP address. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Nov 21, 2010
-
-
Stefan Weil authored
Neither DECLARE_SPRINTF nor BAD_SPRINTF are needed for QEMU. QEMU won't support systems with missing or bad declarations for sprintf. The unused code was detected while looking for functions with missing format checking. Instead of adding GCC_FMT_ATTR, the unused code was removed. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Oct 03, 2010
-
-
Stefan Weil authored
Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Andreas Färber authored
Haiku has O_BINARY in fcntl.h. Signed-off-by:
Andreas Färber <andreas.faerber@web.de> Cc: Jan Kiszka <jan.kiszka@web.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Sep 17, 2010
-
-
Hervé Poussineau authored
IEEE 802.3 standard requires Ethernet frames to be at least 64 bytes long. If it is not the case, they will be considered as runt frames, and may be ignored by netcard and/or OS Signed-off-by:
Hervé Poussineau <hpoussin@reactos.org> Signed-off-by:
Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
Hervé Poussineau authored
Packets with TTL=1 may be directed to local network (DHCP/DNS servers for example), so don't discard them This is required by old versions of NetBSD which send DHCP DISCOVER packets with TTL=1 Signed-off-by:
Hervé Poussineau <hpoussin@reactos.org> Signed-off-by:
Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
- Sep 04, 2010
-
-
Jes Sorensen authored
Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jul 25, 2010
-
-
Stefan Weil authored
The previous patches replaced u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types from stdint.h, so we can now remove their declarations which are no longer needed. Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Stefan Weil authored
There is no need to have a second set of integral types. Replace them by the standard types from stdint.h. Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Jul 06, 2010
-
-
Alex Williamson authored
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-