summaryrefslogtreecommitdiffstats
path: root/commands/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/net.c')
-rw-r--r--commands/net.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/commands/net.c b/commands/net.c
index c7418264dc..c079af1329 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -151,6 +151,9 @@ static int do_dhcp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int size;
+ if (NetLoopInit(DHCP) < 0)
+ return 1;
+
if ((size = NetLoop(DHCP)) < 0)
return 1;
@@ -217,6 +220,9 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
safe_strncpy (BootFile, remotefile, sizeof(BootFile));
+ if (NetLoopInit(proto) < 0)
+ goto out;
+
if ((size = NetLoop(proto)) < 0) {
rcode = size;
goto out;
@@ -256,6 +262,9 @@ static int do_cdp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r;
+ if (NetLoopInit(CDP) < 0)
+ return 1;
+
r = NetLoop(CDP);
if (r < 0) {
printf("cdp failed; perhaps not a CISCO switch?\n");