forked from Imagelibrary/lwip
ci: Add unit test suite to validate tcp state transitions
This commit is contained in:
committed by
Simon Goldschmidt
parent
a6874a46c6
commit
f50c87da6f
@@ -25,7 +25,11 @@ tcp_remove(struct tcp_pcb* pcb_list)
|
||||
while(pcb != NULL) {
|
||||
pcb2 = pcb;
|
||||
pcb = pcb->next;
|
||||
tcp_abort(pcb2);
|
||||
if (pcb2->state == LISTEN) {
|
||||
tcp_close(pcb2);
|
||||
} else {
|
||||
tcp_abort(pcb2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +264,7 @@ void test_tcp_input(struct pbuf *p, struct netif *inp)
|
||||
ip_addr_copy_from_ip4(*ip_current_src_addr(), iphdr->src);
|
||||
ip_current_netif() = inp;
|
||||
ip_data.current_ip4_header = iphdr;
|
||||
ip_data.current_input_netif = inp;
|
||||
|
||||
/* since adding IPv6, p->payload must point to tcp header, not ip header */
|
||||
pbuf_header(p, -(s16_t)sizeof(struct ip_hdr));
|
||||
|
||||
Reference in New Issue
Block a user