aboutsummaryrefslogtreecommitdiff
path: root/slirp.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-09-27 11:20:38 +0200
committerJan Kiszka <jan.kiszka@siemens.com>2011-09-28 13:11:30 +0200
commit9cb0e8129b9e416edad6da4057edf2d4256314e5 (patch)
treea51f682b0e57ebb050d6ae54d0498a0d2ee0ab6f /slirp.c
parent605425be8e09655fcde274a17f7387e9c9fb2291 (diff)
downloadslirp-9cb0e8129b9e416edad6da4057edf2d4256314e5.zip
slirp-9cb0e8129b9e416edad6da4057edf2d4256314e5.tar.gz
slirp-9cb0e8129b9e416edad6da4057edf2d4256314e5.tar.bz2
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>
Diffstat (limited to 'slirp.c')
0 files changed, 0 insertions, 0 deletions