diff options
| author | Michael Brown | 2008-07-31 17:55:46 +0200 |
|---|---|---|
| committer | Michael Brown | 2008-07-31 17:55:46 +0200 |
| commit | 481a21798daf0a805f048cabb65f3a80fc60fd06 (patch) | |
| tree | 02697d7b99464078fe95a0c83a2fb8929c6d0387 /src/net/udp | |
| parent | [cleanup] Remove obsolete README.cvs file (diff) | |
| download | ipxe-481a21798daf0a805f048cabb65f3a80fc60fd06.tar.gz ipxe-481a21798daf0a805f048cabb65f3a80fc60fd06.tar.xz ipxe-481a21798daf0a805f048cabb65f3a80fc60fd06.zip | |
[autoboot] Retain initial-slash (if present) when constructing TFTP URIs
When we boot from a DHCP-supplied filename, we previously relied on
the fact that the current working URI is set to tftp://[next-server]/
in order to resolve the filename into a full tftp:// URI. However,
this process will eliminate the distinction between filenames with and
without initial slashes:
cwuri="tftp://10.0.0.1/" filename="vmlinuz" => URI="tftp://10.0.0.1/vmlinuz"
cwuri="tftp://10.0.0.1/" filename="/vmlinuz" => URI="tftp://10.0.0.1/vmlinuz"
This distinction is important for some TFTP servers. We now
explicitly construct a string of the form
"tftp://[next-server]/filename"
so that a filename with an initial slash will result in a URI
containing a double-slash, e.g.
"tftp://10.0.0.1//vmlinuz"
The TFTP code always strips a single initial slash, and so ends up
presenting the correct path to the server.
URIs entered explicitly by users at the command line must include a
double slash if they want an initial slash presented to the TFTP
server:
"kernel tftp://10.0.0.1/vmlinuz" => filename="vmlinuz"
"kernel tftp://10.0.0.1//vmlinuz" => filename="/vmlinuz"
Diffstat (limited to 'src/net/udp')
0 files changed, 0 insertions, 0 deletions
