Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete sctp shutdown status #18

Closed
wants to merge 1 commit into from
Closed

delete sctp shutdown status #18

wants to merge 1 commit into from

Conversation

LiangFang001
Copy link

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -283,19 +277,12 @@ STATUS sctp_session_free(PSctpSession* ppSctpSession)
CHK(pSctpSession != NULL, retStatus);

usrsctp_deregister_address(pSctpSession);
/* handle issue mentioned here: https://github.com/sctplab/usrsctp/issues/147
* the change in shutdownStatus will trigger onSctpOutboundPacket to return -1 */
ATOMIC_STORE(&pSctpSession->shutdownStatus, SCTP_SESSION_SHUTDOWN_INITIATED);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not safe to do so. sctp session need to wait a ABORT packet before fully destroyed and onSctpOutboundPacket might be called by libusrsctp

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Can onSctpOutboundPacket be triggered by usrsctp_close? I've tried many times, but the onSctpOutboundPacket never be called after usrsctp_close

@ycyang1229
Copy link

Based on the information I got, you refer the PR, sctplab/usrsctp#147 and awslabs#1236.
The usrsctp pr#147 mentioned usrsctp does not clear the void* pointer(or called address)of sctp session so the upper layer needs to protect this behavior in case the conn_output uses the void* pointer. However, usrsctp may send the ABORT thing to complete the three way handshake. This pr may causes soft termination fails, and it also may cause accessing the wrong memory.

@LiangFang001 LiangFang001 closed this by deleting the head repository Dec 19, 2022
@LiangFang001
Copy link
Author

Hi,
@ycyang1229 @codingspirit
Can onSctpOutboundPacket be triggered by usrsctp_close? I've tried many times, but the onSctpOutboundPacket never be called after usrsctp_close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants