From 28cb9375846b4f072f80536549713a6bc8fcf298 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sat, 24 Sep 2005 23:25:46 +0200 Subject: 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 --- net/tftp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/tftp.c') diff --git a/net/tftp.c b/net/tftp.c index a7c246a..748628c 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 -- cgit v1.1