summaryrefslogtreecommitdiff
path: root/net/bootp.c
Commit message (Collapse)AuthorAgeLines
* net/bootp.c: fix tftp load if autoload environment var isn't setPeter Korsgaard2011-09-19-1/+1
| | | | | | | | | | | | | Commit 093498669 (Put common autoload code into auto_load() function) broke handling of autoload environment variable not being set. The bootp/dhcp code will just keep on requesting IP address forever and never start TFTP download. Fix it by moving TftpStart() outside the conditional like it was before. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
* Put common autoload code into auto_load() functionSimon Glass2011-08-08-43/+33
| | | | | | | This is a small clean-up patch. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Eric BĂ©nard <eric@eukrea.com>
* bootp: add ntpserver option to bootp requestLuuk Paulussen2011-07-27-0/+15
| | | | | | Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz> Acked-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Ben Warren <biggerbadderben@gmail.com>
* NET: pass source IP address to packet handlersLuca Ceresoli2011-05-12-3/+6
| | | | | | | | | | This is needed for the upcoming TFTP server implementation. This also simplifies PingHandler() and fixes rxhand_f documentation. Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* Fix bad padding of bootp request packetSimon Glass2011-04-13-1/+1
| | | | | | This seems to pad to one byte longer than required Signed-off-by: Simon Glass <sjg@chromium.org>
* net: Fix potential empty DHCP Parameter Request ListJason Liu2010-11-14-0/+4
| | | | | | | | | | Can't get IP address with dhcp due to the dhcp server not allow the empty param list request under some network env This patch is based on Gray Remlin's initial patch. Signed-off-by: Jason Liu <r64343@freescale.com> Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
* net: pull CONFIG checks out of source and into makefileMike Frysinger2009-12-13-4/+0
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net/bootp.c: fix compile warningWolfgang Denk2009-09-11-1/+5
| | | | | | | | Fix warning: bootp.c:695: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Ben Warren <biggerbadderben@gmail.com>
* minor debug cleanups in ./netRobin Getz2009-08-07-52/+29
| | | | | | | | | | | | | | | Minor ./net cleanups - no functional changes - change #ifdef DEBUG printf(); #endif to just debug() - changed __FUNCTION__ to __func__ - got rid of extra whitespace between function and opening brace - removed unnecessary braces on if statements gcc dead code elimination should make this functionally/size equivalent when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3). Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: rename NetRxPkt to NetRxPacketMike Frysinger2009-07-22-1/+1
| | | | | | | | The net code is mostly consistent in using 'Packet' rather than 'Pkt', so rename the minor detractor to follow suite. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* A VLAN tagged DHCP request/discover is 4 bytes shortNorbert van Bolhuis2009-06-15-2/+2
| | | | | | | | | The problem is that BOOTP_SIZE uses ETHER_HDR_SIZE which is 14 bytes. If sending a VLAN tagged frame (when env variable vlan is set) this should be VLAN_ETHER_HDR_SIZE=18 which is what NetSetEther returns. Signed-off-by: Norbert van Bolhuis <nvbolhuis@aimvalley.nl> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: get mac address from environment and use eth util funcsMike Frysinger2009-03-20-10/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
* convert print_IPaddr() to %pI4Mike Frysinger2009-03-20-13/+5
| | | | | | | | | Now that our printf functions support the %pI4 modifier like the kernel, let's drop the inflexible print_IPaddr() function and covert over to the %pI4 modifier. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-6/+6
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: express the first argument to NetSetTimeout() in millisecondsBartlomiej Sieka2008-10-18-7/+7
| | | | | | | | | | | | | | | | | | 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>
* Fix bogus error message in the DHCP handlerRemy Bohmer2008-08-26-0/+3
| | | | | | | | The DHCP handler has 1 state that is not listed in this case, causing a failure message when there is actually no failure. Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix DHCP protocol so U-Boot does not respond too earlyRobin Getz2008-07-15-2/+0
| | | | | | | | | | on the network with it's offered IP number; it should not reply until after it has received a DHCP ACK message. Also ensures that U-Boot does it's DHCPREQUEST as broadcast (per RFC 2131). Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Acked-by: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix printf() format issues with sizeof_t types by using %zuWolfgang Denk2008-07-14-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Coding Style cleanup; update CHANGELOGWolfgang Denk2008-04-13-20/+20
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* DHCP request fix for Windows Server 2003Aras Vaichas2008-03-30-1/+4
| | | | | | | | | | Added option CONFIG_BOOTP_DHCP_REQUEST_DELAY. This provides an optional delay before sending "DHCP Request" in net/bootp.c. Required to overcome interoperability problems with Windows Server 200x DHCP server when U-Boot client responds too fast for server to handle. Signed-off-by: Aras Vaichas <arasv@magtech.com.au> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix warning differ in signedness in net/net.c and net/nfs.cJean-Christophe PLAGNIOL-VILLARD2007-11-18-1/+1
|
* Cleanup coding style; update CHANGELOGWolfgang Denk2007-11-03-3/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* DHCP Client FixJustin Flammia2007-11-01-4/+7
| | | | | | | | | | | | | | | | This is a multi-part message in MIME format. commit e6e505eae94ed721e123e177489291fc4544b7b8 Author: Justin Flammia <jflammia@savantav.com> Date: Mon Oct 29 17:19:03 2007 -0400 Found a bug in the way the DHCP Request packet is built, where the IP address that is offered by the server is bound to prematurely. This patch is a fix of that bug where the IP address offered by the DHCP server is not used until after the DHCP ACK from the server is received. Signed-off-by: Justin Flammia <jflammia@savantav.com> Signed-off-by: Ben Warren <bwarren@qstreams.com>
* Avoid compiler warning.Wolfgang Denk2007-09-18-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* New CONFIG_BOOTP_SERVERIP optionWilson Callan2007-08-13-0/+2
| | | | | | | | Added CONFIG_BOOTP_SERVERIP to allow the tftp server to be different from the bootp server Signed-off-by: Wilson Callan <wcallan@savantav.com> Signed-off-by: Ben Warren <bwarren@qstreams.com>
* net/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger2007-07-10-9/+9
| | | | | | | | 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>
* Finally retire cmd_confdefs.h and CONFIG_BOOTP_MASK!Jon Loeliger2007-07-09-27/+27
| | | | | | | | | | All of the choices for CONFIG_BOOTP_ are now documented in the README file. You must now individually select exactly the set that you want using a series of #define CONFIG_BOOTP_<x> statements in the board port config files now. Signed-off-by: Jon Loeliger <jdl@freescale.com>
* net/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-09-13/+13
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-13/+13
| | | | | | | | | | | | | | 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>
* Minor code cleanup.Wolfgang Denk2006-10-12-1/+1
|
* Make bootp implementation RFC3046 compliantWolfgang Denk2006-10-09-1/+6
| | | | Patch by Joakim Larsson, 27 Jun 2006
* Add support for the DHCP vendor optional bootfile (#67).Wolfgang Denk2006-03-12-3/+31
| | | | | Ignores the vendor TFTP server name option (#66). Patch by Murray Jensen, 30 Jun 2005
* Cleanup for GCC-4.xWolfgang Denk2005-10-13-9/+9
|
* Fix problems with SNTP support;wdenk2005-04-02-2/+2
| | | | enable SNTP support in some boards.
* * Patch by Masami Komiya, 30 Mar 2005:wdenk2005-04-01-0/+19
| | | | | | | | add SNTP support and expand time server and time offset fields of DHCP support. See doc/README.SNTP * Patch by Steven Scholz, 13 Dec 2004: Fix bug in at91rm920 ethernet driver
* Patches by Pantelis Antoniou, 30 Mar 2004:wdenk2004-04-15-4/+2
| | | | add networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol)
* * Patches by Thomas Viehweger, 16 Mar 2004:wdenk2004-03-23-5/+5
| | | | | | | | | - 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)
* * Patch by Philippe Robin, 09 Mar 2004:wdenk2004-03-14-2/+7
| | | | | | | | | | | | Added ARM Integrator AP, CP and Versatile PB926EJ-S Reference Platform support. * Patch by Masami Komiya, 08 Mar 2004: Don't overwrite server IP address or boot file name when the boot server does not return values * Patch by listmember@orkun.us, 5 Mar 2004: Removed compile time restriction on CFG_I2C_SPEED for DS1338 RTC
* * Patch by Travis Sawyer, 01 Mar 2004:wdenk2004-03-14-0/+4
| | | | | | | | | | | | | | | | | | | Ocotea: - Add IBM PPC440GX Ref Platform support (Ocotea) Original code by Paul Reynolds <PaulReynolds@lhsolutions.com> Adapted to U-Boot and 440GX port 440gx_enet.c: - Add gracious handling of all Ethernet Pin Selections for 440GX - Add RGMII selection for Cicada CIS8201 Gigabit PHY ppc440.h: - Add needed bit definitions - Fix formatting * Patch by Carl Riechers, 1 Mar 2004: Add PPC440GX prbdv0 divider to fix memory clock calculation. * Patch by Stephan Linz, 27 Feb 2004 - avoid problems for targets without NFS download support
* Add support for Siemens SX1 mobile phone;wdenk2004-03-12-265/+261
| | | | | add support for USB-based console (enable with "setenv stdout usbtty; setenv stdin usbtty")
* * Patch by Pierre Aubert, 26 Feb 2004wdenk2004-02-27-10/+30
| | | | | | | | | | | add IDE support for MPC5200 * Patch by Masami Komiya, 26 Feb 2004: add autoload via NFS * Patch by Stephen Williams Use of CONFIG_SERIAL_SOFTWARE_FIFO in board.c consistent with uses elsewhere in the source.
* - Added CONFIG_BOOTP_DNS2 and CONFIG_BOOTP_SEND_HOSTNAME to CONFIG_BOOTP_MASK.stroese2003-08-28-0/+23
|
* * Code cleanup:wdenk2003-06-27-13/+13
| | | | | | | | | - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
* * Add support for RMU boardwdenk2003-06-05-9/+2
| | | | | | | | * 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!)
* * Patches by Udi Finkelstein, 2 June 2003:wdenk2003-06-03-2/+2
| | | | | | | | | | | | | | | | | | | | | | - Added support for custom keyboards, initialized by defining a board-specific drv_keyboard_init as well as defining CONFIG_KEYBOARD . - Added support for the RBC823 board. - cpu/mpc8xx/lcd.c now automatically calculates the Horizontal Pixel Count field. * Fix alignment problem in BOOTP (dhcp_leasetime option) [pointed out by Nicolas Lacressonničre, 2 Jun 2003] * Patch by Mark Rakes, 14 May 2003: add support for Intel e1000 gig cards. * Patch by Nye Liu, 3 Jun 2003: fix critical typo in MAMR definition (include/mpc8xx.h) * Fix requirement to align U-Boot image on 16 kB boundaries on PPC. * Patch by Klaus Heydeck, 2 Jun 2003 Minor changes for KUP4K configuration
* Changed DHCP client to use ip address from server option field #54 from the ↵stroese2003-04-10-4/+4
| | | | OFFER-paket in the server option field #54 in the REQUEST-paket. This fixes a problem using a Windows 2000 DHCP server, where the DHCP-server is not the TFTP-server.
* * Patch by Arun Dharankar, 4 Apr 2003:wdenk2003-04-05-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add IDMA example code (tested on 8260 only) * Add support for Purple Board (MIPS64 5Kc) * Add support for MIPS64 5Kc CPUs * Fix missing setting of "loadaddr" and "bootfile" on ARM and MIPS * Patch by Denis Peter, 04 Apr 2003: - update MIP405-4 board * Patches by Denis Peter, 03 April 2003: - fix PCI IRQs on MPL boards - fix two more un-relocated pointer problems * Fix behaviour of "run" command: - print error message iv variable does not exist - terminate processing of arguments in case of error * Patches by Peter Figuli, 10 Mar 2003 - Add support for BTUART on PXA platform - Add support for WEP EP250 (PXA) board * Fix flash problems on INCA-IP; add tool to allow bruning images to flash using a BDI2000 * Implement fix for I2C Edge Conditions problem for all boards that use the bit-banging driver (common/soft_i2c.c) * Add patches by Robert Schwebel, 31 Mar 2003: - csb226 board: bring in sync with innokom/memsetup.S - csb226 board: fix MDREFR handling - misc doc fixes / extensions - innokom board: cleanup, MDREFR fix in memsetup.S, config update - add BOOT_PROGRESS to armlinux.c
* * Patches by Robert Schwebel, 06 Mar 2003:wdenk2003-03-06-3/+5
| | | | | | | | | | | - fix bug in BOOTP code (must use NetCopyIP) - update of CSB226 port - clear BSS segment on XScale - added support for i2c_init_board() function - update to the Innokom plattform * Extend support for redundand environments for configurations where environment size < sector size
* Initial revisionwdenk2002-09-27-0/+885