david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/usr
Michael Brown 481a21798d [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"
2008-07-31 16:55:46 +01:00
..
aoeboot.c [Settings] Remove assumption that all settings have DHCP tag values 2008-03-25 20:46:16 +00:00
autoboot.c [autoboot] Retain initial-slash (if present) when constructing TFTP URIs 2008-07-31 16:55:46 +01:00
dhcpmgmt.c [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFO 2008-03-23 21:58:05 +00:00
ifmgmt.c [NETDEV] Add notion of link state 2008-04-22 17:40:50 +01:00
imgmgmt.c [image] Fail "imgexec"/"boot" if the image to execute is ambiguous 2008-07-08 03:50:44 +01:00
iscsiboot.c [iSCSI] Support Windows Server 2008 direct iSCSI installation 2008-07-17 17:45:17 +01:00
route.c Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00