aboutsummaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-01-12 09:53:28 +0000
committerMichael Brown <mcb30@etherboot.org>2007-01-12 09:53:28 +0000
commit9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09 (patch)
tree030f6039240763dbaa35d79703ebb9bcd93df0f3 /src/usr
parente2c0055e2393926a0c7424eb3df11fd7501b54f6 (diff)
downloadipxe-9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09.tar.gz
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 a5a79fdf..6042f8b2 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 );