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

[BUG] Problematic implementation of DCEP #1439

Open
hector-chou opened this issue Mar 25, 2022 · 4 comments
Open

[BUG] Problematic implementation of DCEP #1439

hector-chou opened this issue Mar 25, 2022 · 4 comments

Comments

@hector-chou
Copy link

Describe the bug
Does it make sense to have per-channel properties (RtcDataChannelInit) about order and reliability, but reference to the same value (SctpSession.packet[1]) indiscriminately while sending messages?

if ((pSctpSession->packet[1] & DCEP_DATA_CHANNEL_RELIABLE_UNORDERED) != 0) {
pSctpSession->spa.sendv_sndinfo.snd_flags |= SCTP_UNORDERED;
}
if ((pSctpSession->packet[1] & DCEP_DATA_CHANNEL_REXMIT) != 0) {
pSctpSession->spa.sendv_prinfo.pr_policy = SCTP_PR_SCTP_RTX;
pSctpSession->spa.sendv_prinfo.pr_value = getUnalignedInt32BigEndian((PINT32) (pSctpSession->packet + SIZEOF(UINT32)));
}
if ((pSctpSession->packet[1] & DCEP_DATA_CHANNEL_TIMED) != 0) {
pSctpSession->spa.sendv_prinfo.pr_policy = SCTP_PR_SCTP_TTL;
pSctpSession->spa.sendv_prinfo.pr_value = getUnalignedInt32BigEndian((PINT32) (pSctpSession->packet + SIZEOF(UINT32)));
}

It leads to the consequence that we can't have any ordered/reliable channel if we want to have any unordered/unreliable channel, and vice versa.

And is it the reason why we just ignore those properties that comes with DATA_CHANNEL_OPEN message, for channels created by peer? This handler sets nothing about order and reliability.

STATUS handleDcepPacket(PSctpSession pSctpSession, UINT32 streamId, PBYTE data, SIZE_T length)

In the end, why didn't we have DATA_CHANNEL_ACK?

enum {
DCEP_DATA_CHANNEL_OPEN = 0x03,
};

SDK version number
v1.7.2

Expected behavior

  • Properties about order and reliability should be applied per-channel.
  • The same properties in DATA_CHANNEL_OPEN message should be complied.
  • We should do DATA_CHANNEL_ACK.
@hector-chou hector-chou added the bug Something isn't working label Mar 25, 2022
@disa6302 disa6302 added needs-triage and removed bug Something isn't working labels Mar 25, 2022
@disa6302 disa6302 added the bug Something isn't working label May 23, 2022
@github-actions
Copy link

This is a very old issue. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

@github-actions
Copy link

This is a very old issue. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

Copy link

This is a very old issue. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

Copy link

This is a very old issue. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

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

No branches or pull requests

5 participants