nsh/telnetd: bringup the network before telnetd init

bringup the network before telnetd init if without NSH_CONSOLE

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2021-05-06 21:52:48 +08:00 committed by Xiang Xiao
parent 6d3782c961
commit a5337af484

View File

@ -47,6 +47,7 @@
#include <arpa/inet.h>
#include "netutils/netinit.h"
#include "netutils/telnetd.h"
#ifdef CONFIG_TELNET_CHARACTER_MODE
@ -266,6 +267,12 @@ int nsh_telnetstart(sa_family_t family)
nsh_initscript(vtbl);
#endif
#if defined(CONFIG_NSH_NETINIT) && !defined(CONFIG_NSH_CONSOLE)
/* Bring up the network */
netinit_bringup();
#endif
/* Perform architecture-specific final-initialization(if configured) */
#if defined(CONFIG_NSH_ARCHINIT) && \