mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-16 18:03:44 +08:00
TCP unit tests: fix that ip.rterr stats are increased (some unit tests had no netif set)
This commit is contained in:
@@ -45,8 +45,9 @@ tcp_setup(void)
|
||||
static void
|
||||
tcp_teardown(void)
|
||||
{
|
||||
netif_list = NULL;
|
||||
tcp_remove_all();
|
||||
netif_list = NULL;
|
||||
netif_default = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,16 +78,19 @@ START_TEST(test_tcp_recv_inseq)
|
||||
struct tcp_pcb* pcb;
|
||||
struct pbuf* p;
|
||||
char data[] = {1, 2, 3, 4};
|
||||
ip_addr_t remote_ip, local_ip;
|
||||
ip_addr_t remote_ip, local_ip, netmask;
|
||||
u16_t data_len;
|
||||
u16_t remote_port = 0x100, local_port = 0x101;
|
||||
struct netif netif;
|
||||
struct test_tcp_txcounters txcounters;
|
||||
LWIP_UNUSED_ARG(_i);
|
||||
|
||||
/* initialize local vars */
|
||||
memset(&netif, 0, sizeof(netif));
|
||||
IP4_ADDR(&local_ip, 192, 168, 1, 1);
|
||||
IP4_ADDR(&remote_ip, 192, 168, 1, 2);
|
||||
IP4_ADDR(&netmask, 255, 255, 255, 0);
|
||||
test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask);
|
||||
data_len = sizeof(data);
|
||||
/* initialize counter struct */
|
||||
memset(&counters, 0, sizeof(counters));
|
||||
|
||||
Reference in New Issue
Block a user