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
Michael Brown 0af0888832 [tftp] Do not change current working URI when TFTP server is cleared
For historical reasons, iPXE sets the current working URI to the root
of the TFTP server whenever the TFTP server address is changed.  This
was originally implemented in the hope of allowing a DHCP-provided
TFTP filename to be treated simply as a relative URI.  This usage
turns out to be impractical since DHCP-provided TFTP filenames may
include characters which would have special significance to the URI
parser, and so the DHCP next-server+filename combination is now
handled by the dedicated pxe_uri() function instead.

The practice of setting the current working URI to the root of the
TFTP server is potentially helpful for interactive uses of iPXE,
allowing a user to type e.g.

  iPXE> dhcp
  Configuring (net0 52:54:00:12:34:56)... ok
  iPXE> chain pxelinux.0

and have the URI "pxelinux.0" interpreted as being relative to the
root of the TFTP server provided via DHCP.

The current implementation of tftp_apply_settings() has an unintended
flaw.  When the "dhcp" command is used to renew a DHCP lease (or to
pick up potentially modified DHCP options), the old settings block
will be unregistered before the new settings block is registered.
This causes tftp_apply_settings() to believe that the TFTP server has
been changed twice (to 0.0.0.0 and back again), and so the current
working URI will always be set to the root of the TFTP server, even if
the DHCP response provides exactly the same TFTP server as previously.

Fix by doing nothing in tftp_apply_settings() whenever there is no
TFTP server address.

Debugged-by: Andrew Widdersheim <awiddersheim@inetu.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-01-09 14:51:21 +00:00
..
arch [romprefix] Report an optimistic runtime size estimate 2016-01-06 00:30:23 +00:00
bin Rename .cvsignore files to .gitignore 2007-06-09 22:57:00 +01:00
config [dhcp] Limit maximum number of DHCP discovery deferrals 2015-11-10 14:05:46 +00:00
core [downloader] Update image URI in response to a redirection 2016-01-09 13:30:42 +00:00
crypto [crypto] Dual-license more selected DRBG files 2016-01-04 15:39:07 +00:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [usb] Add support for numeric keypad on USB keyboards 2016-01-06 18:55:08 +00:00
hci [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-05 11:40:13 +00:00
image [efi] Add support for EFI_GRAPHICS_OUTPUT_PROTOCOL frame buffer consoles 2015-10-16 16:38:41 +01:00
include [image] Provide image_set_uri() to modify an image's URI 2016-01-09 13:22:37 +00:00
interface [settings] Expose SMBIOS settings as global variables 2015-12-23 15:29:55 +00:00
libgcc [build] Mark __intel_new_proc_init with __libgcc rather than cdecl 2009-08-03 15:56:10 +01:00
net [tftp] Do not change current working URI when TFTP server is cleared 2016-01-09 14:51:21 +00:00
tests [tcpip] Avoid generating positive zero for transmitted UDP checksums 2015-09-10 14:46:54 +01:00
usr [uri] Generalise tftp_uri() to pxe_uri() 2015-09-02 13:38:53 +01:00
util [efi] Add %.usb target for building EFI-bootable USB (or other) disk images 2015-12-07 13:08:22 +00:00
.gitignore [build] Add support for local configuration files 2010-03-26 19:07:22 +00:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00
Makefile [crypto] Support SHA-{224,384,512} in X.509 certificates 2015-08-02 16:54:24 +01:00
Makefile.housekeeping [build] Allow extra objects to be included in an all-drivers build 2015-12-17 13:54:51 +00:00