qemu/slirp
Thomas Huth 2b44043265 slirp: Fix packet expiration
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>
2011-09-28 13:11:30 +02:00
..
arp_table.c slirp: Fix types of IP address parameters 2011-08-05 12:51:11 +02:00
bootp.c Simple ARP table 2011-08-03 12:57:06 +02:00
bootp.h
cksum.c
COPYRIGHT
debug.h
if.c slirp: Only start packet expiration for delayed ones 2011-08-05 14:05:53 +02:00
if.h
ip_icmp.c Wrap recv to avoid warnings 2011-07-25 14:38:56 +00:00
ip_icmp.h
ip_input.c slirp: Fix unusual "comments" in unused code 2011-07-27 10:10:17 +01:00
ip_output.c
ip.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
libslirp.h Fix include statements for qemu-common.h 2011-09-09 09:56:12 +01:00
main.h Delayed IP packets 2011-08-03 12:57:11 +02:00
mbuf.c Delayed IP packets 2011-08-03 12:57:11 +02:00
mbuf.h slirp: Fix packet expiration 2011-09-28 13:11:30 +02:00
misc.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
misc.h
sbuf.c
sbuf.h
slirp_config.h
slirp.c char: rename qemu_chr_write() -> qemu_chr_fe_write() 2011-08-22 10:17:15 -05:00
slirp.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
socket.c Wrap recv to avoid warnings 2011-07-25 14:38:56 +00:00
socket.h
tcp_input.c slirp: Fix use after release on tcp_input 2011-09-28 13:10:22 +02:00
tcp_output.c
tcp_subr.c Remove blanks before \n in output strings 2011-09-16 08:25:56 -05:00
tcp_timer.c
tcp_timer.h
tcp_var.h
tcp.h slirp: Fix bit field types in IP header structs 2011-08-14 23:34:44 -07:00
tcpip.h
tftp.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
tftp.h
udp.c
udp.h