fixed LWIP bug of exception

This commit is contained in:
wlyu 2022-03-22 14:21:49 +08:00
parent f13343bf0f
commit c9455ea442
1 changed files with 3 additions and 0 deletions

View File

@ -1386,6 +1386,9 @@ tcp_output(struct tcp_pcb *pcb)
/* In the case of fast retransmit, the packet should not go to the tail
* of the unacked queue, but rather somewhere before it. We need to check for
* this case. -STJ Jul 27, 2004 */
/*when useg is NULL, cause exception*/
if(useg == NULL)
break;
if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) {
/* add segment to before tail of unacked list, keeping the list sorted */
struct tcp_seg **cur_seg = &(pcb->unacked);