summaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-03-14 15:06:13 +0000
committerwdenk <wdenk>2004-03-14 15:06:13 +0000
commit3d3befa754fedb320f779320ac0ab11deb0a6275 (patch)
treee017681961bbc93b2145f929fe95c8e2f47a1726 /net/bootp.c
parent4d13cbad1c81ad7901151fec381bae8c30f4338a (diff)
downloadu-boot-imx-3d3befa754fedb320f779320ac0ab11deb0a6275.zip
u-boot-imx-3d3befa754fedb320f779320ac0ab11deb0a6275.tar.gz
u-boot-imx-3d3befa754fedb320f779320ac0ab11deb0a6275.tar.bz2
* Patch by Philippe Robin, 09 Mar 2004:
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
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bootp.c b/net/bootp.c
index b760b88..9eae34f 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -117,10 +117,15 @@ static int BootpCheckPkt(uchar *pkt, unsigned dest, unsigned src, unsigned len)
*/
static void BootpCopyNetParams(Bootp_t *bp)
{
+ IPaddr_t tmp_ip;
+
NetCopyIP(&NetOurIP, &bp->bp_yiaddr);
- NetCopyIP(&NetServerIP, &bp->bp_siaddr);
+ NetCopyIP(&tmp_ip, &bp->bp_siaddr);
+ if (tmp_ip != 0)
+ NetCopyIP(&NetServerIP, &bp->bp_siaddr);
memcpy (NetServerEther, ((Ethernet_t *)NetRxPkt)->et_src, 6);
- copy_filename (BootFile, bp->bp_file, sizeof(BootFile));
+ if (strlen(bp->bp_file) > 0)
+ copy_filename (BootFile, bp->bp_file, sizeof(BootFile));
debug ("Bootfile: %s\n", BootFile);