GithubHelp home page GithubHelp logo

pr-sctp-improved's People

Contributors

stewrtrs avatar tuexen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pr-sctp-improved's Issues

I-FORWARD-TSN-Chunk is used although support has not been indicated by both endpoints

When an endpoints wants to use the user message interleaving and activates it by calling:

+0.0 setsockopt(3, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, [2], 4) = 0
+0.0 setsockopt(3, IPPROTO_SCTP, SCTP_INTERLEAVING_SUPPORTED, {assoc_value=1}, 8) = 0

after receiving an INIT-Chunk like:

INIT[flgs=0, tag=1, a_rwnd=1500, os=16, is=16, tsn=1, FORWARD_TSN_SUPPORTED[], SUPPORTED_EXTENSIONS[types=[FORWARD_TSN, I_DATA]]]

and completing the handshake, it uses the I-DATA-Chunk, which should be acceptable, because of section 2.2.1. of sctp-ndata internet draft:

A sender MUST NOT send an I-DATA chunk unless both peers have
indicated its support of the I-DATA chunk type within the Supported
Extensions Parameter as defined in [RFC5061]. If I-DATA support has
been negotiated on an association, I-DATA chunks MUST be used for all
user messages and DATA-chunk MUST NOT be used. If I-DATA support has
not been negotiated on an association, DATA chunks MUST be used for
all user messages and I-DATA chunks MUST NOT be used.

If one outstanding user message is abandoned it uses the I-FORWARD-TSN-Chunk that the other endpoint does not support. It should use the FORWARD-TSN-Chunk i assume. See the following test-case for more details:

No Bundling of DATA and FORWARD-TSN-Chunks

Incoming SACK-Chunks are allowed when NR-SACK-Chunks are listed at the supported-extensions

When both endpoints have listed NR-SACK-Chunks at the supported extensions in the INIT and INIT-ACK-Chunks incoming SACK-Chunks are accepted by the FreeBSD-Kernel-Implementation. At the internet draft "Load Sharing for the Stream Control Transmission Protocol (SCTP)" i was not be able to find any information on how to handle those situations (see https://tools.ietf.org/html/draft-tuexen-tsvwg-sctp-multipath-12#page-6). There is although one paragraph stating:

Once both endpoints indicate during association establishment that
they support the NR-SACK extension, each endpoint SHOULD acknowledge
received DATA chunks with NR-SACK chunks, and not SACK chunks. That
is, throughout an SCTP association, both endpoints SHOULD send either
SACK chunks or NR-SACK chunks, never a mixture of the two.

See the following test cases fore more details:

Already abandoned user messages are not discarded as early as possible

When two not fragmented user messages are sent and the cwnd only allows one outstanding I_DATA-Chunk the second user message should be discarded if it has already been abandoned by a PR-SCTP-Policy (for example the ttl has expired).

The current FreeBSD-Implementation still tries to deliver the already abandoned second user message after the first user message has been abandoned by sending a I_FORWARD-TSN for the first user message and then sending a I_DATA-Chunk for the already abandoned second user message.

See the following test case for more details:

The Forward-TSN-supported parameter is not listed at the unrecognized parameters

When an INIT_ACK-Chunk like

INIT_ACK[flgs=0, tag=2, a_rwnd=1500, os=16, is=16, tsn=1, STATE_COOKIE[len=4, val=...], FORWARD_TSN_SUPPORTED[]]

is injected and PR-SCTP-Support is disabled at FreeBSD, it is not listed at the unrecognized parameters at the COOKIE_ECHO-Chunk. See the following test-cases for more details:

I-FORWARD-TSN-Chunk is accepted when no I-DATA-Support is announced at handshake

When an INIT-Chunk like

INIT[flgs=0, tag=1, a_rwnd=1500, os=1, is=1, tsn=0, FORWARD_TSN_SUPPORTED[], SUPPORTED_EXTENSIONS[types=[FORWARD_TSN, I_FORWARD_TSN]]]

in injected and later after the handshake is completed the following I-FORWARD-TSN-Chunk is injected:

I_FORWARD_TSN[cum_tsn=1, ids=[]]

the FreeBSD-Implementation sends an SACK-Chunk instead of an ERROR-Chunk.

In section 2.3.1. of the internet draft "Stream Schedulers and User Message Interleaving for the Stream Control Transmission Protocol" it says:

Support for the I-FORWARD-TSN chunk is negotiated during the SCTP
association setup via the Supported Extensions Parameter as defined
in [RFC5061]. Only if both end points support the I-DATA chunk and
the I-FORWARD-TSN chunk, the partial reliability extension can be
used in combination with user message interleaving.

See the following test-case for more details:

FreeBSD does not react to FORWARD-TSN-Chunk without any previous DATA-Chunks

Timing-Problems on Sender Side Implementation

In the test-case https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/ttl-policy/sender-side-implementation-7_1.pkt the FORWARD-TSN-Chunk in line 84 is not transmitted like expected at the relative time +2.0 seconds after the first retransmission.

Currently the test-case also fails, because the FORWARD-TSN-Chunk is not bundled with the still outstanding DATA-Chunk in line 81. This Issue is therefore related to #5.

sid/ssn values are reported multiple times in one FORWARD-TSN Chunk

When there are multiple outstanding DATA-Chunks of one fragmented ordered user message the current FreeBSD-Kernel reports each outstanding DATA-Chunk sid/ssn value in an sent FORWARD-TSN Chunk if the fragmented ordered user message is abandoned.

Ideally it should only report the sid/ssn value once in the FORWARD-TSN Chunk, because if there are multiple fragmented DATA-Chunks outstanding the FORWARD-TSN Chunk gets filled with duplicate sid/ssn values.

See the following test cases for more details:

Unordered user message is not delivered if two FORWARD-TSN-Chunks are bundled

In the following test-case three unordered user messages with two fragments are outstanding and only the DATA-Chunk with E-Flag set has arrived the IUT. Then the third user message is completed with a DATA-Chunk and the first and second user message is abandoned by sending two bundled FORWARD-TSN-Chunks.

After that the sctp_recvmsg call fails and does not deliver the third message to the userland application. See the following test case for more details:

Unordered user messages can not be received out of order

In the following test-cases sctp_recvmsg fails under FreeBSD if two (or more) user messages arrived the implementation out of order. When some fragments of an outstanding user message are missing, the following user messages are not delivered to the userland application.

For example if tsn=2,3,4 of two user messages (first message got tsn=1, 2 second user message got tsn=3, 4) are received and tsn=1 are missing the kernel does not deliver the complete second user message (tsn=3,4).

See the following test-cases for more details:

Information in nr_gap-Blocks in NR-SACK-Chunks are not used optimally

When an association uses NR-SACK-Chunks and support for PR-SCTP is enabled when sending three user messages where the first and third have a ttl of 500ms and the second user message must be delivered, the FreeBSD-Implemention does not use the information of an incoming NR-SACK-Chunk where in the nr_gap-Block the second user message is acknowledged non regenable.

It should ideally send an FORWARD-TSN with cum_tsn=3. See the following test cases for more details:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.