mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 14:46:01 +00:00
test_dhcp: set link up on net_test netif
DHCP test code didn't set link up on net_test netif (exposed by changes
in 637bce91b4
)
Then during the test_dhcp function, a Gratuitous ARP was not sent during
the call to dhcp_bind() because the link was still down
The sets the link state for all DHCP test functions
This commit is contained in:
parent
637bce91b4
commit
1147b9ce38
|
@ -448,6 +448,7 @@ START_TEST(test_dhcp)
|
||||||
IP4_ADDR(&gw, 0, 0, 0, 0);
|
IP4_ADDR(&gw, 0, 0, 0, 0);
|
||||||
|
|
||||||
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
||||||
|
netif_set_link_up(&net_test);
|
||||||
netif_set_up(&net_test);
|
netif_set_up(&net_test);
|
||||||
|
|
||||||
dhcp_start(&net_test);
|
dhcp_start(&net_test);
|
||||||
|
@ -520,6 +521,7 @@ START_TEST(test_dhcp_nak)
|
||||||
IP4_ADDR(&gw, 0, 0, 0, 0);
|
IP4_ADDR(&gw, 0, 0, 0, 0);
|
||||||
|
|
||||||
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
||||||
|
netif_set_link_up(&net_test);
|
||||||
netif_set_up(&net_test);
|
netif_set_up(&net_test);
|
||||||
|
|
||||||
dhcp_start(&net_test);
|
dhcp_start(&net_test);
|
||||||
|
@ -741,6 +743,7 @@ START_TEST(test_dhcp_relayed)
|
||||||
IP4_ADDR(&gw, 0, 0, 0, 0);
|
IP4_ADDR(&gw, 0, 0, 0, 0);
|
||||||
|
|
||||||
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
||||||
|
netif_set_link_up(&net_test);
|
||||||
netif_set_up(&net_test);
|
netif_set_up(&net_test);
|
||||||
|
|
||||||
dhcp_start(&net_test);
|
dhcp_start(&net_test);
|
||||||
|
@ -882,6 +885,7 @@ START_TEST(test_dhcp_nak_no_endmarker)
|
||||||
IP4_ADDR(&gw, 0, 0, 0, 0);
|
IP4_ADDR(&gw, 0, 0, 0, 0);
|
||||||
|
|
||||||
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
||||||
|
netif_set_link_up(&net_test);
|
||||||
netif_set_up(&net_test);
|
netif_set_up(&net_test);
|
||||||
|
|
||||||
dhcp_start(&net_test);
|
dhcp_start(&net_test);
|
||||||
|
@ -981,6 +985,7 @@ START_TEST(test_dhcp_invalid_overload)
|
||||||
IP4_ADDR(&gw, 0, 0, 0, 0);
|
IP4_ADDR(&gw, 0, 0, 0, 0);
|
||||||
|
|
||||||
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input);
|
||||||
|
netif_set_link_up(&net_test);
|
||||||
netif_set_up(&net_test);
|
netif_set_up(&net_test);
|
||||||
|
|
||||||
dhcp_start(&net_test);
|
dhcp_start(&net_test);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user