From 10d19bd2ac302cd5237e7b1ca200760594a3c8c2 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 25 Oct 2013 17:24:09 +0100 Subject: [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.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 --- src/usr/dhcpmgmt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/usr') diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c index b61c01aa3..10d8ecfa5 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; } -- cgit v1.2.3-55-g7522