summaryrefslogtreecommitdiff
path: root/net/tftp.c
AgeCommit message (Collapse)Author
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18net: Make TFTP server timeout configurableBartlomiej Sieka
There are two aspects of a TFTP transfer involving timeouts: 1. timeout waiting for initial server reply after sending RRQ 2. timeouts while transferring actual data from the server Since the upcoming auto-update feature attempts a TFTP download during each boot, it is undesirable to have a long delay when the TFTP server is not available. Thus, this commit makes the server timeout (1.) configurable by two global variables: TftpRRQTimeoutMSecs TftpRRQTimeoutCountMax TftpRRQTimeoutMSecs overrides default timeout when trying to connect to a TFTP server, TftpRRQTimeoutCountMax overrides default number of connection retries. The total delay when trying to download a file from a non-existing TFTP server is TftpRRQTimeoutMSecs x TftpRRQTimeoutCountMax milliseconds. Timeouts during file transfers (2.) are unaffected. Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-18net: express the first argument to NetSetTimeout() in millisecondsBartlomiej Sieka
Enforce millisecond semantics of the first argument to NetSetTimeout() -- the change is transparent for well-behaving boards (CFG_HZ == 1000 and get_timer() countiing in milliseconds). Rationale for this patch is to enable millisecond granularity for network-related timeouts, which is needed for the upcoming automatic software update feature. Summary of changes: - do not scale the first argument to NetSetTimeout() by CFG_HZ - change timeout values used in the networking code to milliseconds Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Don't tftp to unknown flashJochen Friedrich
If a board has a variable number of flash banks, there are empty entries in flash_info[] and CFG_DIRECT_FLASH_TFTP is set, tftp boot fails with "Outside available Flash". This patch skips flash banks with unknown flash ids. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-07-09Fix printf errors.Andrew Klossner
The compiler will help find mismatches between printf formats and arguments if you let it. This patch adds the necessary attributes to declarations in include/common.h, then begins to correct the resulting compiler warnings. Some of these were bugs, e.g., "$d" instead of "%d" and incorrect arguments. Others were just annoying, like int-long mismatches on a system where both are 32 bits. It's worth fixing the annoying errors to catch the real ones. Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
2008-02-14TFTP: fix search of ':' in BootFileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-02-05TFTP: add host ip addr supportJean-Christophe PLAGNIOL-VILLARD
allow to use a different server as set in serverip add CONFIG_TFTP_FILE_NAME_MAX_LEN to configure the file name length if not defined the max length will be at 128 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-11-18Fix warning differ in signedness in net/net.c and net/nfs.cJean-Christophe PLAGNIOL-VILLARD
2007-08-31Fix TFTP OACK code for short packets.Wolfgang Denk
The old code had a loop limit overflow bug which caused a semi- infinite loop for small packets, because in "i<len-8", "i" was signed, but "len" was unsigned, and "len-8" became a huge number for small values of "len". This is a workaround which replaces broken commit 8f1bc284. Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-08-30Backout commit 8f1bc284 as it causes TFTP to fail.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-08-30tftp: don't implicity trust the format of recevied packetsGrant Likely
The TFTP OACK code trusts that the incoming packet is formated as ASCII text and can be processed by string functions. It also has a loop limit overflow bug where if the packet length is less than 8, it ends up looping over *all* of memory to find the 'blksize' string. This patch solves the problem by forcing the packet to be null terminated and using strstr() to search for the sub string. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-08-29Fix: TFTP is not working on little endian systemsstefano babic
TFTP does not work anymore after multicast tftp patch was applied on little endian systems. This patch fix it. Signed-off-by: Stefano Babic <sbabic@denx.de>
2007-08-1586xx: Fix lingering CFG_CMD_* references in sbc8641d.hJon Loeliger
Remove a leftover in net/tftp.c while we're at it. Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-08-14Coding style cleanup; rebuild CHANGELOGWolfgang Denk
2007-08-13multicast tftp: RFC2090David Updegraff
Implemented IETF RFC2090, Multicast TFTP. Initial implementation on Realtek RTL8139 and Freescale TSEC. Signed-off-by: David Updegraff <dave@cray.com> Signed-off-by: Ben Warren <bwarren@qstreams.com>
2007-07-10net/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger
Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. Those always evaluated TRUE, and thus were always compiled even when IDE really wasn't defined/wanted. Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-09net/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
2006-08-14Fix typo.Wolfgang Denk
Patch by Andreas Engel, 28 Nov 2005
2005-10-15Merge with /home/m8/git/u-bootWolfgang Denk
2005-10-13Cleanup for GCC-4.xWolfgang Denk
2005-10-11Added support for TQM834x boards.Marian Balakowicz
2005-09-24Update for TFTP using a fixed UDP portWolfgang Denk
Use the approved environment variable names. Added "tftpdstp" to allow ports other than 69 per Tolunay Orkun's recommendation. Patch by Jerry Van Baren, 12 Jan 2005
2005-09-24Allow to force TFTP to use a fixed UDP portWolfgang Denk
(Add a configuration option CONFIG_TFTP_PORT and optional env variable tftpport) Patch by Jerry Van Baren, 10 Jan 2005
2005-08-26Prepare U-Boot for gcc-4.xWolfgang Denk
2005-08-04Fix endianess problem in TFTP / NFS default filenamesWolfgang Denk
Patch by Hiroshi Ito, 06 Dec 2004
2004-04-15Patches by Pantelis Antoniou, 30 Mar 2004:wdenk
add networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol)
2004-03-23* Patches by Thomas Viehweger, 16 Mar 2004:wdenk
- show PCI clock frequency on MPC8260 systems - add FCC_PSMR_RMII flag for HiP7 processors - in do_jffs2_fsload(), take load address from load_addr if not set explicit, update load_addr otherwise - replaced printf by putc/puts when no formatting is needed (smaller code size, faster execution)
2004-02-23* Patch by Laurent Mohin, 10 Feb 2004:wdenk
Fix buffer overflow in common/usb.c * Patch by Tolunay Orkun, 10 Feb 2004: Add support for Cogent CSB272 board * Code cleanup
2004-02-23* CVS add missing fileswdenk
* Cleanup compiler warnings * Fix problem with side effects in macros in include/usb.h * Patch by David Benson, 13 Nov 2003: bug 841358 - fix TFTP download size limit * Fixing bug 850768: improper flush_cache() in load_serial() * Fixing bug 834943: MPC8540 - missing volatile declarations * Patch by Stephen Williams, 09 Feb 2004: Add support for Xilinx SystemACE chip: - New files common/cmd_ace.c and include/systemace.h - Hook systemace support into cmd_fat and the partition manager * Patch by Travis Sawyer, 09 Feb 2004: Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux
2003-11-17* Use "-fPIC" instead of "-mrelocatable" to prevent problems withwdenk
recent tools * Add checksum verification to 'imls' command * Add bd_info fields needed for 4xx Linux I2C driver * Patch by Martin Krause, 4 Nov. 2003: Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap) * Print used network interface when CONFIG_NET_MULTI is set
2003-10-06* Update TRAB auto update codewdenk
* Make fatload set filesize environment variable fix potential buffer overlow problem * enable basic / medium / high-end configurations for PPChameleonEVB board; fix NAND code * enable TFTP client code to specify to the server the desired timeout value (see RFC-2349)
2003-08-17* Make Ethernet autonegotiation on INCA-IP work for all clock rates;wdenk
allow selection of clock frequency as "make" target * Implement memory autosizing code for IceCube boards * Configure network port on INCA-IP for autonegotiation * Fix overflow problem in network timeout code * Patch by Richard Woodruff, 8 Aug 2003: Allow crc32 to be used at address 0x000 (crc32_no_comp, too).
2003-06-05* Add support for RMU boardwdenk
* Add support for TQM862L at 100/50 MHz * Patch by Pantelis Antoniou, 02 Jun 2003: major reconstruction of networking code; add "ping" support (outgoing only!)
2002-11-03Initial revisionwdenk