Преглед на файлове

[pxe] Remove pxe_set_cached_filename()

gPXE currently overwrites the filename stored in the cached DHCP
packets when a call to PXENV_TFTP_READ_FILE or PXENV_RESTART_TFTP is
made.  This code has existed for many years as a workaround for RIS,
which seemed to require that this be done.

pxe_set_cached_filename() causes problems with the Bootix NBP, and a
recent test demonstrates that RIS will complete successfully even with
pxe_set_cached_filename() removed.  There have been many changes to
the DHCP and PXE logic since this code was first added, and it is
quite plausible that it was masking a bug that no longer exists.

Reported-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Debugged-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
tags/v1.20.1
Michael Brown преди 14 години
родител
ревизия
80d1ac7320
променени са 3 файла, в които са добавени 0 реда и са изтрити 37 реда
  1. 0
    2
      src/arch/i386/include/pxe.h
  2. 0
    21
      src/arch/i386/interface/pxe/pxe_preboot.c
  3. 0
    14
      src/arch/i386/interface/pxe/pxe_tftp.c

+ 0
- 2
src/arch/i386/include/pxe.h Целия файл

@@ -149,6 +149,4 @@ extern struct net_device *pxe_netdev;
149 149
 
150 150
 extern void pxe_set_netdev ( struct net_device *netdev );
151 151
 
152
-extern void pxe_set_cached_filename ( const unsigned char *filename );
153
-
154 152
 #endif /* PXE_H */

+ 0
- 21
src/arch/i386/interface/pxe/pxe_preboot.c Целия файл

@@ -102,24 +102,6 @@ static struct pxe_dhcp_packet_creator pxe_dhcp_packet_creators[] = {
102 102
 static union pxe_cached_info __bss16_array ( cached_info, [NUM_CACHED_INFOS] );
103 103
 #define cached_info __use_data16 ( cached_info )
104 104
 
105
-/**
106
- * Set PXE cached TFTP filename
107
- *
108
- * @v filename		TFTP filename
109
- *
110
- * This is a bug-for-bug compatibility hack needed in order to work
111
- * with Microsoft Remote Installation Services (RIS).  The filename
112
- * used in a call to PXENV_RESTART_TFTP or PXENV_TFTP_READ_FILE must
113
- * be returned as the DHCP filename in subsequent calls to
114
- * PXENV_GET_CACHED_INFO.
115
- */
116
-void pxe_set_cached_filename ( const unsigned char *filename ) {
117
-	memcpy ( cached_info[CACHED_INFO_DHCPACK].dhcphdr.file, filename,
118
-		 sizeof ( cached_info[CACHED_INFO_DHCPACK].dhcphdr.file ) );
119
-	memcpy ( cached_info[CACHED_INFO_BINL].dhcphdr.file, filename,
120
-		 sizeof ( cached_info[CACHED_INFO_BINL].dhcphdr.file ) );
121
-}
122
-
123 105
 /**
124 106
  * UNLOAD BASE CODE STACK
125 107
  *
@@ -236,9 +218,6 @@ PXENV_EXIT_t pxenv_restart_tftp ( struct s_PXENV_TFTP_READ_FILE
236 218
 
237 219
 	DBG ( "PXENV_RESTART_TFTP " );
238 220
 
239
-	/* Intel bug-for-bug hack */
240
-	pxe_set_cached_filename ( restart_tftp->FileName );
241
-
242 221
 	/* Words cannot describe the complete mismatch between the PXE
243 222
 	 * specification and any possible version of reality...
244 223
 	 */

+ 0
- 14
src/arch/i386/interface/pxe/pxe_tftp.c Целия файл

@@ -171,9 +171,6 @@ static int pxe_tftp_open ( uint32_t ipaddress, unsigned int port,
171 171
 	struct in_addr address;
172 172
 	int rc;
173 173
 
174
-	/* Intel bug-for-bug hack */
175
-	pxe_set_cached_filename ( filename );
176
-
177 174
 	/* Reset PXE TFTP connection structure */
178 175
 	memset ( &pxe_tftp, 0, sizeof ( pxe_tftp ) );
179 176
 	xfer_init ( &pxe_tftp.xfer, &pxe_tftp_xfer_ops, NULL );
@@ -470,17 +467,6 @@ PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
470 467
  * value before calling this function in protected mode.  You cannot
471 468
  * call this function with a 32-bit stack segment.  (See the relevant
472 469
  * @ref pxe_x86_pmode16 "implementation note" for more details.)
473
- *
474
- * @note Microsoft's NTLDR assumes that the filename passed in via
475
- * s_PXENV_TFTP_READ_FILE::FileName will be stored in the "file" field
476
- * of the stored DHCPACK packet, whence it will be returned via any
477
- * subsequent calls to pxenv_get_cached_info().  Though this is
478
- * essentially a bug in the Intel PXE implementation (not, for once,
479
- * in the specification!), it is a bug that Microsoft relies upon, and
480
- * so we implement this bug-for-bug compatibility by overwriting the
481
- * filename stored DHCPACK packet with the filename passed in
482
- * s_PXENV_TFTP_READ_FILE::FileName.
483
- *
484 470
  */
485 471
 PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
486 472
 				    *tftp_read_file ) {

Loading…
Отказ
Запис