11 Star 76 Fork 99

OpenHarmony / third_party_lwip

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
0096-tcp_send_fin-add-the-fin-to-the-last-unsent-segment.patch 949 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aurora 提交于 2024-03-28 16:36 . update lwip from 2.1.3-90 to 2.1.3-102
From c91f1d05c65526fe250cf5e5c32f9038721bc1d5 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Mon, 25 Dec 2023 12:39:56 +0800
Subject: [PATCH] tcp_send_fin: add the fin to the last unsent segment
---
src/core/tcp_out.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c
index 137e3cf..e5c407e 100644
--- a/src/core/tcp_out.c
+++ b/src/core/tcp_out.c
@@ -1195,8 +1195,8 @@ tcp_send_fin(struct tcp_pcb *pcb)
LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
/* first, try to add the fin to the last unsent segment */
- if (pcb->unsent != NULL) {
- struct tcp_seg *last_unsent = pcb->unsent;
+ if (pcb->last_unsent != NULL) {
+ struct tcp_seg *last_unsent = pcb->last_unsent;
if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
/* no SYN/FIN/RST flag in the header, we can add the FIN flag */
--
2.33.0
1
https://gitee.com/openharmony/third_party_lwip.git
git@gitee.com:openharmony/third_party_lwip.git
openharmony
third_party_lwip
third_party_lwip
master

搜索帮助