These examples all set the IP address of eth1 is DHCP is enabled. That can't be right???

This commit is contained in:
Gregory Nutt 2014-11-17 07:21:55 -06:00
parent e5cbc23202
commit ffbfe4d365
5 changed files with 5 additions and 6 deletions

View File

@ -41,7 +41,6 @@ OBJS = host.o1 dhcpd.o1
BIN = dhcpd
HOSTCFLAGS += -DCONFIG_NETUTILS_DHCPD_HOST=1
HOSTCFLAGS += -DCONFIG_NETUTILS_DHCPD_INTERFACE=\"eth1\"
HOSTCFLAGS += -DHAVE_SO_REUSEADDR=1
HOSTCFLAGS += -DHAVE_SO_BROADCAST=1

View File

@ -157,7 +157,7 @@ int discover_main(int argc, char *argv[])
{
struct dhcpc_state ds;
(void)dhcpc_request(handle, &ds);
netlib_sethostaddr("eth1", &ds.ipaddr);
netlib_sethostaddr("eth0", &ds.ipaddr);
if (ds.netmask.s_addr != 0)
{

View File

@ -170,7 +170,7 @@ static int tcpecho_netsetup()
return ERROR;
}
netlib_sethostaddr("eth1", &ds.ipaddr);
netlib_sethostaddr("eth0", &ds.ipaddr);
if (ds.netmask.s_addr != 0)
{
@ -364,7 +364,7 @@ static int tcpecho_server(void)
****************************************************************************/
/****************************************************************************
* discover_main
* tcpecho_main
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL

View File

@ -163,7 +163,7 @@ int webserver_main(int argc, char *argv[])
{
struct dhcpc_state ds;
(void)dhcpc_request(handle, &ds);
netlib_sethostaddr("eth1", &ds.ipaddr);
netlib_sethostaddr("eth0", &ds.ipaddr);
if (ds.netmask.s_addr != 0)
{

View File

@ -331,7 +331,7 @@ static int xmlrpc_netinit(void)
{
struct dhcpc_state ds;
(void)dhcpc_request(handle, &ds);
netlib_sethostaddr("eth1", &ds.ipaddr);
netlib_sethostaddr("eth0", &ds.ipaddr);
if (ds.netmask.s_addr != 0)
{