diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-08-26 16:02:46 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-08-26 16:08:58 +0100 |
commit | f0c6c4efd8008d07911a552fe5e44dfe3ad7e06d (patch) | |
tree | 402ba9a63436e47495cb202900b19722689226ab /src/net | |
parent | ba3695353add020b686547699ba5e259c339bfa6 (diff) | |
download | ipxe-f0c6c4efd8008d07911a552fe5e44dfe3ad7e06d.zip ipxe-f0c6c4efd8008d07911a552fe5e44dfe3ad7e06d.tar.gz ipxe-f0c6c4efd8008d07911a552fe5e44dfe3ad7e06d.tar.bz2 |
[dhcp] Do not skip ProxyDHCPREQUEST if next-server is empty
We attempt to mimic the behaviour of Intel's PXE ROM by skipping the
separate ProxyDHCPREQUEST if the ProxyDHCPOFFER already contains a
boot filename or a PXE boot menu.
Experimentation reveals that Intel's PXE ROM will also check for a
non-empty next-server address alongside the boot filename. Update our
test to match this behaviour.
Reported-by: Wissam Shoukair <wissams@mellanox.com>
Tested-by: Wissam Shoukair <wissams@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/udp/dhcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index aed5ee3..36c2b13 100644 --- a/src/net/udp/dhcp.c +++ b/src/net/udp/dhcp.c @@ -296,8 +296,9 @@ static void dhcp_set_state ( struct dhcp_session *dhcp, */ static int dhcp_has_pxeopts ( struct dhcp_packet *dhcppkt ) { - /* Check for a boot filename */ - if ( dhcppkt_fetch ( dhcppkt, DHCP_BOOTFILE_NAME, NULL, 0 ) > 0 ) + /* Check for a next-server and boot filename */ + if ( dhcppkt->dhcphdr->siaddr.s_addr && + ( dhcppkt_fetch ( dhcppkt, DHCP_BOOTFILE_NAME, NULL, 0 ) > 0 ) ) return 1; /* Check for a PXE boot menu */ |