2014-05-05 |
tftp: add timeframe when remote server is retransmitting
...
If there's packet loss and the remote server needs to retransmit,
there is falsely no timeframe left because TIMEOUT (server wait time)
and TFTP_TIMEOUT (abort timer) are the same.
This patch increases TFTP_TIMEOUT.
See RFC2349 for more info: http://tools.ietf.org/html/rfc2349
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Christoph Fritz
authored
on 30 Apr 2014
Sascha Hauer
committed
on 5 May 2014
|
2014-02-26 |
fs: tftp: Fix writing files to tftp
...
Copying files to tftp is broken since:
| commit d4f5bb1
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Sat Sep 28 13:12:50 2013 +0200
|
| copy_file: Add missing O_TRUNC
|
| Without it, when copying a smaller file over a larger file the
| resulting file still has the remaining space from the larger file.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Since this commit copy_file passes O_TRUNC to open(). This results in the
fs layer calling fsdrv->truncate. tftp returns -ENOSYS here and open returns
with an error. To fix this return 0 for the truncate callback in tftp. Also
enforce the O_TRUNC flag when opening a file for writing on tftp as the files
are always truncated on tftp anyway.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: andreas.willig@rafi.de
Sascha Hauer
committed
on 26 Feb 2014
|
2013-08-12 |
fs: tftp: don't duplicate timeout information
...
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Baruch Siach
authored
on 11 Aug 2013
Sascha Hauer
committed
on 12 Aug 2013
|
2013-06-20 |
read_file: Make it work on tftp servers which do not pass size
...
Some tftp servers (for example netkit-tftp) do not pass the filesize.
Add a workaround for read_file which reads the file into a temporary
file which then is copied to a buffer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 20 Jun 2013
|
2013-02-04 |
Merge branch 'for-next/misc'
Sascha Hauer
committed
on 4 Feb 2013
|
2013-01-27 |
treewide: fix format specifiers
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Jan 2013
|
2013-01-20 |
tftp: reset timer on progress
...
When during tftp receive operation a ACK packet can't successfully be sent
the timer was resetted directly after send resulting in a deadlock.
This patch changes the timer reset operation in a way that it is only resetted
when the actually is progress, namely in the TFTP_ACK/TFTP_DATA pathes in the
tftp handler.
Reported-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Sascha Hauer
committed
on 20 Jan 2013
|
2012-11-26 |
mem: add the swab (swap bytes) option to memory_display()
...
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Antony Pavlov
authored
on 26 Nov 2012
Sascha Hauer
committed
on 26 Nov 2012
|
2012-10-24 |
fs tftp: Fix possible fifo overflow
...
In tftp_read we send a request for a new packet without checking if we
have enough space in the FIFO. This can lead to a FIFO overflow and a
corrupt file. Add a check for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sascha Hauer
committed
on 24 Oct 2012
|
fs tftp: Only request a block once
...
tftp_send is called often. Each time, when in STATE_RDATA, a packet
is requested from the tftp server, even if we requested the same packet
already.
Stop this by tracking which packet we requested.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 24 Oct 2012
|
2012-09-17 |
Treewide: remove address of the Free Software Foundation
...
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Sep 2012
|
2012-06-30 |
use loff_t for file offsets
...
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Jun 2012
|
2012-06-24 |
fs tftp: Fix short file transfers
...
With files smaller than the tftp block size the whole transfer is done
in tftp_do_open already. In this case we are in STATE_DONE, but there
is no error. Set priv->err to 0 and check for it to be able to transfer
small files.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 24 Jun 2012
|
2012-04-15 |
fs tftp: use resolv to resolv ip address
...
instead of assuming the backingstore is a ip address, use resolv()
to make it possible to pass in a hostname.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Apr 2012
|
2012-02-25 |
fs: get fs device using container_of
...
This reduces the usage of dev->type_data.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 25 Feb 2012
|
2012-02-19 |
Add suport for tftp as a filesystem
...
This adds tftp filesystem support. It currently duplicates
significant amounts of the tftp (command) support. This is ok
since we can eventually drop the original tftp command later.
tftp is not really suitable to be handled as a filesystem. It lacks
support for stat, reading directories and other things. Handling
it as a filesystem has one big advantage though: tftp is no special
case for boot scripts and/or commands anymore which makes them simpler.
This implementation has some improvements to the original tftp command.
It supports blocksize negotiation which speeds up transfers if the tftp
server supports it. Also we can determine the filesize to transfer if
the remote end supports it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 19 Feb 2012
|