|
@@ -51,8 +51,18 @@ enum pxe_cached_info_indices {
|
51
|
51
|
/** A cached DHCP packet */
|
52
|
52
|
union pxe_cached_info {
|
53
|
53
|
struct dhcphdr dhcphdr;
|
54
|
|
- char raw[ETH_FRAME_LEN];
|
55
|
|
-};
|
|
54
|
+ /* This buffer must be *exactly* the size of a BOOTPLAYER_t
|
|
55
|
+ * structure, otherwise WinPE will die horribly. It takes the
|
|
56
|
+ * size of *our* buffer and feeds it in to us as the size of
|
|
57
|
+ * one of *its* buffers. If our buffer is larger than it
|
|
58
|
+ * expects, we therefore end up overwriting part of its data
|
|
59
|
+ * segment, since it tells us to do so. (D'oh!)
|
|
60
|
+ *
|
|
61
|
+ * Note that a BOOTPLAYER_t is not necessarily large enough to
|
|
62
|
+ * hold a DHCP packet; this is a flaw in the PXE spec.
|
|
63
|
+ */
|
|
64
|
+ BOOTPLAYER_t packet;
|
|
65
|
+} __attribute__ (( packed ));
|
56
|
66
|
|
57
|
67
|
/* The case in which the caller doesn't supply a buffer is really
|
58
|
68
|
* awkward to support given that we have multiple sources of options,
|