[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #10260] Set SO_LINGER and close socket will trigger
From: |
yuanjianmin |
Subject: |
[lwip-devel] [patch #10260] Set SO_LINGER and close socket will trigger LWIP_ASSERT |
Date: |
Tue, 28 Jun 2022 06:10:11 -0400 (EDT) |
URL:
<https://savannah.nongnu.org/patch/?10260>
Summary: Set SO_LINGER and close socket will trigger
LWIP_ASSERT
Project: lwIP - A Lightweight TCP/IP stack
Submitter: yuanjm
Submitted: Tue 28 Jun 2022 10:10:09 AM UTC
Category: TCP
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 28 Jun 2022 10:10:09 AM UTC By: yuanjianmin <yuanjm>
When i create a TCP server socket and set SO_LINGER. Then i call listen
function to hear connection from peer. After that i call close to close this
socket and then LWIP_ASSERT appear.
I search the code and found it in
http://git.savannah.gnu.org/cgit/lwip.git/tree/src/core/tcp.c#n576. That means
lwip not allowed that tcp_abort called when tcp in LISTEN state.
Of course, i agree with the LWIP_ASSERT, but i think we can modify the LWIP
code to avoid to call tcp_abort. We can call tcp_close when SO_LINGER set and
TCP state is in LISTEN.
The attachment is my patch to avoid this assert. Glad to hear your voice.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 28 Jun 2022 10:10:09 AM UTC Name:
0001-Fix-close-listen-TCP-which-set-SO_LINGER-will-trigge.patch Size: 1023B
By: yuanjm
<http://savannah.nongnu.org/patch/download.php?file_id=53380>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/patch/?10260>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [patch #10260] Set SO_LINGER and close socket will trigger LWIP_ASSERT,
yuanjianmin <=