From 9952df9b52a1bdd7e38ddb37dd2bf7923d4ecc09 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 12 Jan 2007 09:53:28 +0000 Subject: Add "dhcp" command --- src/usr/dhcpmgmt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/usr') 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 ); -- cgit v1.2.3-55-g7522