]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Update for TFTP using a fixed UDP port
authorWolfgang Denk <wd@pollux.(none)>
Sat, 24 Sep 2005 21:25:46 +0000 (23:25 +0200)
committerWolfgang Denk <wd@pollux.(none)>
Sat, 24 Sep 2005 21:25:46 +0000 (23:25 +0200)
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

CHANGELOG
README
net/tftp.c

index bc194ffa815354e8d40924a6c5cc384d853ed8a3..4994701fb7b9a422d65adec0e1664ac4f58ee98a 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,11 @@
 Changes for U-Boot 1.1.4:
 ======================================================================
 
+* 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
+
 * Allow to force TFTP to use a fixed UDP port
   (Add a configuration option CONFIG_TFTP_PORT and optional env
   variable tftpport)
diff --git a/README b/README
index 3b36e50e11d5995fb2b36dbebaf3b1a097aec4f5..9c3ff3844e66aa430044775429aa45cc9abd638c 100644 (file)
--- a/README
+++ b/README
@@ -1490,12 +1490,16 @@ The following options need to be configured:
 - TFTP Fixed UDP Port:
                CONFIG_TFTP_PORT
 
-               If this is defined, the environment variable tftpport
+               If this is defined, the environment variable tftpsrcp
                is used to supply the TFTP UDP source port value.
-               If tftpport isn't defined, the normal pseudo-random port
+               If tftpsrcp isn't defined, the normal pseudo-random port
                number generator is used.
 
-               The purpose for this is to allow a TFTP server to
+               Also, the environment variable tftpdstp is used to supply
+               the TFTP UDP destination port value.  If tftpdstp isn't
+               defined, the normal port 69 is used.
+
+               The purpose for tftpsrcp is to allow a TFTP server to
                blindly start the TFTP transfer using the pre-configured
                target IP address and UDP port. This has the effect of
                "punching through" the (Windows XP) firewall, allowing
@@ -2468,9 +2472,12 @@ Some configuration options can be set using Environment Variables:
                  Useful on scripts which control the retry operation
                  themselves.
 
-  tftpport     - If this is set, the value is used for TFTP's
+  tftpsrcport  - If this is set, the value is used for TFTP's
                  UDP source port.
 
+  tftpdstport  - If this is set, the value is used for TFTP's UDP
+                 destination port instead of the Well Know Port 69.
+
    vlan                - When set to a value < 4095 the traffic over
                  ethernet is encapsulated/received over 802.1q
                  VLAN tagged frames.
index a7c246a7de5a2e817826987c35a2de3fa5b5303f..748628cf94ea4a41941806ae4ce768e376961ef2 100644 (file)
@@ -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