aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-10-25 17:24:09 +0100
committerMichael Brown <mcb30@ipxe.org>2013-10-25 17:29:25 +0100
commit10d19bd2ac302cd5237e7b1ca200760594a3c8c2 (patch)
tree8759bfa0d517e82eeec8ca3829f56cd291465fda /src/usr
parent1aa67eba161f0e1410d8028bd60ee6778ebfa977 (diff)
downloadipxe-10d19bd2ac302cd5237e7b1ca200760594a3c8c2.zip
ipxe-10d19bd2ac302cd5237e7b1ca200760594a3c8c2.tar.gz
ipxe-10d19bd2ac302cd5237e7b1ca200760594a3c8c2.tar.bz2
[pxe] Always retrieve cached DHCPACK and apply to relevant network device
When chainloading, always retrieve the cached DHCPACK packet from the underlying PXE stack, and apply it as the original contents of the "net<X>.dhcp" settings block. This allows cached DHCP settings to be used for any chainloaded iPXE binary (not just undionly.kkpxe). This change eliminates the undocumented "use-cached" setting. Issuing the "dhcp" command will now always result in a fresh DHCP request. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/dhcpmgmt.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c
index b61c01a..10d8ecf 100644
--- a/src/usr/dhcpmgmt.c
+++ b/src/usr/dhcpmgmt.c
@@ -51,12 +51,8 @@ int dhcp ( struct net_device *netdev ) {
/* Perform DHCP */
printf ( "DHCP (%s %s)", netdev->name,
netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
- if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 ) {
+ if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
rc = monojob_wait ( "" );
- } else if ( rc > 0 ) {
- printf ( " using cached\n" );
- rc = 0;
- }
return rc;
}