[Etherboot-developers] Re: [Etherboot-users] TFTP timeout problem
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Donald J C. <dj...@ci...> - 2001-04-25 22:00:08
|
(Switched from Etherboot-users to Etherboot-developers.)
Donald J Christensen wrote:
>
> With Etherboot 4.7.23, I have a problem if the tftp download times
> out. Best I can tell from the code, the transfer
> should restart from the beginning, but it doesn't.
...
Okay, I dug into it and found the problem. The tctx structure does
not get properly re-initialized if the TFTP transfer fails (times
out) and gets restarted. Below is the one-line change to fix the
problem. The crux of the problem is the use of tctx.seglen in
tagged_download().
The diff is against the 5.0.0 sources and fixes Tagged image downloads.
I don't use Elf or a.out, so the same problem may exist with those
formats.
-Don
--- osloader.c.orig Wed Apr 25 14:54:30 2001
+++ osloader.c Wed Apr 25 14:54:54 2001
@@ -1020,7 +1020,7 @@
printf("(NBI)... ");
image_type = Tagged;
/* Zero all context info */
- memset(&tctx.img, 0, sizeof(tctx.img));
+ memset(&tctx, 0, sizeof(tctx));
/* Copy first 4 longwords */
memcpy(&tctx.img, data, sizeof(tctx.img));
/* Memory location where we are supposed to save it */
--
Don Christensen Senior Software Development Engineer
dj...@ci... MMABU - Mid-Market Access Business Unit
Cisco Systems ComLOB - Commercial Line of Business
San Jose, CA "So much relies on the course that you take
The fool and the wise man both burn at the stake"
|