summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2012-02-03 23:14:04 -0500
committerGene Cumm <gene.cumm@gmail.com>2012-06-02 08:22:08 -0400
commit87b2cfbe323b7d53c5df27b066f235c7c1bf4aae (patch)
tree2f23b11706ad13e7c5f19dbd223d8f2dd97b596d
parent98bd851f6eb241c4303f3f27df1241651c112525 (diff)
downloadsyslinux-87b2cfbe323b7d53c5df27b066f235c7c1bf4aae.tar.gz
prdhcp.c32: Fix what is retrieved.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r--com32/modules/prdhcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/com32/modules/prdhcp.c b/com32/modules/prdhcp.c
index 5b572b0b..321d4e77 100644
--- a/com32/modules/prdhcp.c
+++ b/com32/modules/prdhcp.c
@@ -136,11 +136,12 @@ void print_dhcp_pkt_all(void)
pxe_bootp_t *p;
size_t len;
int i;
+ int ptype[3] = {PXENV_PACKET_TYPE_DHCP_DISCOVER, PXENV_PACKET_TYPE_DHCP_ACK, PXENV_PACKET_TYPE_CACHED_REPLY};
for (i = 0; i < 3; i++) {
- if (!pxe_get_cached_info(PXENV_PACKET_TYPE_CACHED_REPLY,
+ if (!pxe_get_cached_info(ptype[i],
(void **)&(p), &(len))) {
- dprintf("Got packet #%d\n", i);
+ dprintf("Got packet #%d/%d\n", (i + 1), ptype[i]);
print_pxe_bootp_t(p, len);
pressanykey();
}