]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
net: Fix TftpStart() ip:filename bug
authorPeter Tyser <ptyser@xes-inc.com>
Mon, 1 Dec 2008 22:29:38 +0000 (16:29 -0600)
committerBen Warren <biggerbadderben@gmail.com>
Fri, 5 Dec 2008 06:51:54 +0000 (22:51 -0800)
commit6a86bb6c25376f0358478219fa28d7c84dd01ed0
treea4ef1b3397ef184072eb8c7e1c55cb200995c06d
parentd32c5be50bf0600bfdc54223ef341ee9c63db445
net: Fix TftpStart() ip:filename bug

The TftpStart() function modifies the 'BootFile'
string when 'BootFile' contains both an IP address
and filename (eg 1.2.3.4:/path/file). This causes
subsequent calls to TftpStart to incorrectly parse
the TFTP filename and server IP address to use.
For example:

=> tftp 0x100000 10.52.0.62:/home/ptyser/non_existant
Speed: 100, half duplex
Using eTSEC1 device
TFTP from server 10.52.0.62; our IP address is 10.52.253.79
                 ^^^^^^^^^^ CORRECT
Filename '/home/ptyser/non_existant'.
          ^^^^^^^^^^^^^^^^^^^^^^^^^ CORRECT
Load address: 0x100000
Loading: *
TFTP error: 'File not found' (1)
Starting again

eTSEC2: No link.
Speed: 100, half duplex
Using eTSEC1 device
TFTP from server 10.52.0.33; our IP address is 10.52.253.79
                 ^^^^^^^^^^ WRONG
Filename '10.52.0.62'.
          ^^^^^^^^^^ WRONG
Load address: 0x100000
Loading: *
TFTP error: 'File not found' (1)
Starting again

TftpStart() was modified to not modify the 'BootFile' string.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
net/tftp.c