summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.(none)>2005-09-24 23:25:46 +0200
committerWolfgang Denk <wd@pollux.(none)>2005-09-24 23:25:46 +0200
commit28cb9375846b4f072f80536549713a6bc8fcf298 (patch)
tree425d1a1ac55715461f3445c117612b972bc25fa5 /net
parentecb0ccd9c260701183bc8d35966e65e6a2feb2f6 (diff)
downloadu-boot-28cb9375846b4f072f80536549713a6bc8fcf298.tar.gz
u-boot-28cb9375846b4f072f80536549713a6bc8fcf298.tar.xz
u-boot-28cb9375846b4f072f80536549713a6bc8fcf298.zip
Update for TFTP using a fixed UDP port
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
Diffstat (limited to 'net')
-rw-r--r--net/tftp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/tftp.c b/net/tftp.c
index a7c246a7de..748628cf94 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -371,7 +371,10 @@ TftpStart (void)
/* Use a pseudo-random port unless a specific port is set */
TftpOurPort = 1024 + (get_timer(0) % 3072);
#ifdef CONFIG_TFTP_PORT
- if ((ep = getenv("tftpport")) != NULL) {
+ if ((ep = getenv("tftpdstp")) != NULL) {
+ TftpServerPort = simple_strtol(ep, NULL, 10);
+ }
+ if ((ep = getenv("tftpsrcp")) != NULL) {
TftpOurPort= simple_strtol(ep, NULL, 10);
}
#endif