summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2007-01-12 10:53:28 +0100
committerMichael Brown2007-01-12 10:53:28 +0100
commit9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09 (patch)
tree030f6039240763dbaa35d79703ebb9bcd93df0f3 /src/usr
parentLet ifmgmt.c take care of calling efree(), since it's the once which (diff)
downloadipxe-9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09.tar.gz
ipxe-9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09.tar.xz
ipxe-9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09.zip
Add "dhcp" command
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/dhcpmgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c
index a5a79fdfc..6042f8b2c 100644
--- a/src/usr/dhcpmgmt.c
+++ b/src/usr/dhcpmgmt.c
@@ -45,6 +45,10 @@ int dhcp ( struct net_device *netdev ) {
struct in_addr gateway = { INADDR_NONE };
int rc;
+ /* Check we can open the interface first */
+ if ( ( rc = ifopen ( netdev ) ) != 0 )
+ return rc;
+
/* Free up any previously-acquired options */
if ( dhcp_options ) {
unregister_dhcp_options ( dhcp_options );