From c9455ea4429f1135b434cfdd0b0b83d27ae39b29 Mon Sep 17 00:00:00 2001 From: wlyu Date: Tue, 22 Mar 2022 14:21:49 +0800 Subject: [PATCH] fixed LWIP bug of exception --- Ubiquitous/XiZi/resources/ethernet/LwIP/core/tcp_out.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/core/tcp_out.c b/Ubiquitous/XiZi/resources/ethernet/LwIP/core/tcp_out.c index 724df1097..456d28917 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/core/tcp_out.c +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/core/tcp_out.c @@ -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);