[BUG] Bug State Transition From FIN_WAIT_1.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- networking
Research direction
Start in FreeRTOS_TCP_State_Handling.c, in prvTCPHandleFin and the eFIN_WAIT_1/eFIN_WAIT_2 branches the issue cites (around lines 231-302). Compare the transitions with RFC793 page 74: a FIN that has been ACKed should go to TIME_WAIT, and an unacknowledged FIN should go to CLOSING, not CLOSE_WAIT or LAST_ACK. Done means simultaneous close follows those transitions, and the change is checked against the TCP state tests in the repository.
Written by the indexing model from the issue text.
Description
Describe the bug
The current implementation of the TCP state machine in FreeRTOS_TCP_State_Handling.c does not fully follow RFC793 behavior for connection termination when handling simultaneous close ( both sides send FIN). The stack transitions to CLOSE_WAIT rather than properly handling the CLOSING/TIME_WAIT states as specified by the RFC793.
Specifically, as specified in RFC793 [Page 74], when the state is in FIN-WAIT-1 STATE, it specifies:
If our FIN has been ACKed (perhaps in this segment), then enter TIME-WAIT, start the time-wait timer, turn off the other timers; otherwise, enter the CLOSING state.
When is FIN-WAIT2
Enter the TIME-WAIT state. Start the time-wait timer, turn off the other timers.
However, In FreeRTOS_TCP_State_Handling.c, when the state is eFIN_WAIT_1 or eFIN_WAIT_2, it goes into the function prvTCPHandleFin. However, the implementation, when FIN is ACKed, it enters to CLOSE_WAIT (Line 302) instead of TIME_WAIT. When not ACKed, the implementation enters into LAST_ACK (Line 273) instead of CLOSING specified.
- Dominant language
- C
- Stars
- 215
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FreeRTOS/FreeRTOS-Plus-TCP
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 95/100
FreeRTOS/FreeRTOS-Plus-TCP#1389 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
FreeRTOS/FreeRTOS-Plus-TCP#1388 ·
-
[BUG] PhyHandling incorrectly lists LAN8742A as having 19 PHYCRPossibly taken @StitchLilo626 claimed this 41 days ago. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
FreeRTOS/FreeRTOS-Plus-TCP#1361 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 66/100
FreeRTOS/FreeRTOS-Plus-TCP#1392 · 1 comment ·
All issues in FreeRTOS/FreeRTOS-Plus-TCP
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
shinyquagsire23/OpenJKDF2#540 ·
Maintainers usually reply within 12 days
-
Prison work hall: laundry and kitchen stations stand at bare walls, the hatch has no counter or signOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Life-Framework/Life-Framework#5939 ·
Maintainers usually reply within 1 day
-
autoconf failes to find libsodium even when present due to implicit function declarationPossibly taken @coderjoe claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 13 days
-
Bug Status: Needs Triage
Difficulty 1/5 Under an hour Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug python
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Jstar269/nakagawa-recomp#3521 ·
Maintainers usually reply within 1 day