From 673d47530d39dbb30429c5e5600a6f8f21baeb7e Mon Sep 17 00:00:00 2001 From: jiangheng Date: Tue, 30 Jan 2024 21:46:14 +0800 Subject: [PATCH] fix receive fin packet process error --- ...fix-receive-fin-packet-process-error.patch | 59 +++++++++++++++++++ lwip.spec | 6 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0108-fix-receive-fin-packet-process-error.patch diff --git a/0108-fix-receive-fin-packet-process-error.patch b/0108-fix-receive-fin-packet-process-error.patch new file mode 100644 index 0000000..3dae612 --- /dev/null +++ b/0108-fix-receive-fin-packet-process-error.patch @@ -0,0 +1,59 @@ +From 7dbceaeab7f85df6a58b77858c507fa9087d5ba7 Mon Sep 17 00:00:00 2001 +From: jiangheng +Date: Mon, 22 Jan 2024 20:38:57 +0800 +Subject: [PATCH] fix receive fin packet process error + +--- + src/core/tcp_in.c | 9 --------- + src/include/lwipsock.h | 1 + + 2 files changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c +index 9d5a695..84d22ca 100644 +--- a/src/core/tcp_in.c ++++ b/src/core/tcp_in.c +@@ -1142,9 +1142,6 @@ tcp_process(struct tcp_pcb *pcb) + if (recv_flags & TF_GOT_FIN) { + tcp_ack_now(pcb); + pcb->state = CLOSE_WAIT; +-#if GAZELLE_ENABLE +- API_EVENT(((struct netconn *)pcb->callback_arg), NETCONN_EVT_ERROR, 0); +-#endif + } + } else { + /* incorrect ACK number, send RST */ +@@ -1163,9 +1160,6 @@ tcp_process(struct tcp_pcb *pcb) + if (recv_flags & TF_GOT_FIN) { /* passive close */ + tcp_ack_now(pcb); + pcb->state = CLOSE_WAIT; +-#if GAZELLE_ENABLE +- API_EVENT(((struct netconn *)pcb->callback_arg), NETCONN_EVT_ERROR, 0); +-#endif + } + break; + case FIN_WAIT_1: +@@ -1820,9 +1814,6 @@ tcp_receive(struct tcp_pcb *pcb) + recv_flags |= TF_GOT_FIN; + if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ + pcb->state = CLOSE_WAIT; +-#if GAZELLE_ENABLE +- API_EVENT(((struct netconn *)pcb->callback_arg), NETCONN_EVT_ERROR, 0); +-#endif + } + } + +diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h +index ccc8c43..f4cb1de 100644 +--- a/src/include/lwipsock.h ++++ b/src/include/lwipsock.h +@@ -120,7 +120,6 @@ struct lwip_sock { + char pad2 __rte_cache_aligned; + /* stack thread all use */ + struct list_node recv_list; +- struct pbuf *send_lastdata; + struct pbuf *send_pre_del; + sem_t snd_ring_sem; + +-- +2.33.0 + diff --git a/lwip.spec b/lwip.spec index 6302eb8..2e0df55 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.1.3 -Release: 113 +Release: 114 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -124,6 +124,7 @@ Patch9103: 0104-optimize-enqueue-for-unacked-and-unsent-queue.patch Patch9104: 0105-delete-redundant-logs-in-lwip.patch Patch9105: 0106-remove-unnecessary-variables-in-struct-pbuf.patch Patch9106: 0107-fix-move-lpcb-to-the-front-of-list-error.patch +Patch9107: 0108-fix-receive-fin-packet-process-error.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -153,6 +154,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Tue Jan 30 2024 jiangheng - 2.1.3-114 +- fix receive fin packet process error + * Tue Jan 30 2024 jiangheng - 2.1.3-113 - fix move lpcb to the front of list error