summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2008-07-31 17:55:46 +0200
committerMichael Brown2008-07-31 17:55:46 +0200
commit481a21798daf0a805f048cabb65f3a80fc60fd06 (patch)
tree02697d7b99464078fe95a0c83a2fb8929c6d0387 /src/include
parent[cleanup] Remove obsolete README.cvs file (diff)
downloadipxe-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/include')
-rw-r--r--src/include/gpxe/settings.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/gpxe/settings.h b/src/include/gpxe/settings.h
index ae5a259d..78f3e698 100644
--- a/src/include/gpxe/settings.h
+++ b/src/include/gpxe/settings.h
@@ -215,6 +215,7 @@ extern struct setting password_setting __setting;
extern struct setting priority_setting __setting;
extern struct setting bios_drive_setting __setting;
extern struct setting uuid_setting __setting;
+extern struct setting next_server_setting __setting;
/**
* Initialise a settings block