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
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 @@
/* 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