Second batch of changes (no problems)

This commit is contained in:
Sebastien Lorquet 2017-05-19 17:37:17 +02:00
parent caeb6b32fd
commit aefddc3648
6 changed files with 30 additions and 0 deletions

View File

@ -127,6 +127,11 @@ int dhcpd_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
netlib_set_ipv4netmask("eth0", &addr);
/* New versions of netlib_set_ipvXaddr will not bring the network up,
* So ensure the network is really up at this point. */
netlib_ifup("eth0");
/* Then start the server */
dhcpd_run();

View File

@ -134,6 +134,11 @@ int discover_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
netlib_set_ipv4netmask("eth0", &addr);
/* New versions of netlib_set_ipvXaddr will not bring the network up,
* So ensure the network is really up at this point. */
netlib_ifup("eth0");
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
/* Get the MAC address of the NIC */

View File

@ -150,6 +150,11 @@ int sendmail_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_NETMASK);
netlib_set_ipv4netmask("eth0", &addr);
/* New versions of netlib_set_ipvXaddr will not bring the network up,
* So ensure the network is really up at this point. */
netlib_ifup("eth0");
/* Then send the mail */
net_ipaddr(addr.s_addr, 127, 0, 0, 1);

View File

@ -143,6 +143,11 @@ static int tcpecho_netsetup()
addr.s_addr = HTONL(CONFIG_EXAMPLES_TCPECHO_NETMASK);
netlib_set_ipv4netmask("eth0", &addr);
/* New versions of netlib_set_ipvXaddr will not bring the network up,
* So ensure the network is really up at this point. */
netlib_ifup("eth0");
#ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC
/* Get the MAC address of the NIC */

View File

@ -160,6 +160,11 @@ int udp_main(int argc, char *argv[])
#endif /* CONFIG_EXAMPLES_UDP_IPv6 */
/* New versions of netlib_set_ipvXaddr will not bring the network up,
* So ensure the network is really up at this point. */
netlib_ifup("eth0");
#ifdef CONFIG_EXAMPLES_UDP_SERVER
recv_server();
#else

View File

@ -358,6 +358,11 @@ static void nsh_netinit_configure(void)
netlib_set_ipv4dnsaddr(&addr);
#endif
/* New versions of netlib_set_ipvXaddr will not bring the network up,
* So ensure the network is really up at this point. */
netlib_ifup("eth0");
#ifdef CONFIG_WIRELESS_WAPI
/* Associate the wlan with an access point. */