GithubHelp home page GithubHelp logo

stream-reset-improved's People

Contributors

stewrtrs avatar tuexen avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

juanparker1

stream-reset-improved's Issues

FreeBSD answers to INCOMING SSN RESET with OUTGOING SSN RESET and RESPONSE Parameter. RFC says only OUTGOING SSN RESET

When FreeBSD receives a INCOMING_SSN_RESET request it response with a OUTGOING_SSN_RESET, like in rfc deined, and a second RECONFIG RESPONSE parameter. The RECONFIG RESPONSE is not nessesary.

see testcase https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_or/sctp-sr-c-or-v-6-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_or/sctp-sr-c-or-v-7-1.pkt

FreeBSD doesn't stop reconfig timer for ssn_tsn_reset if getting response with result 0xffff

FreeBSD doesn't stop the reconfig timer for a ssn/tsn reset request, if the response field is 0xffff. The response is not a valid result code but RFC 6525 said that at first an implementation should stop the reconfig timer regardless of which result is in the response parameter. If the result code is only 6 the reconfig time should be started again.
see tests
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-6-3.pkt

SUT receives OUTGOING_SSN_RESET with last_tsn is a cum_tsn_point +1, then sending new data for streams which reset is requested and last_tsn is a gap. After Tester resend last_tsn FreeBSD 10.3 send malformed reconfig chunk. FreeBSD 11 doesn't send response

When FreeBSD enters the state deferred reset processing and gets further TSNs, it send a maleformed reconfig chunk after leaving the state. This happens only when the cum_tsn is greater than last_tsn after leaving the state deferred reset processing. FreeBSD 11 doesn't send a response. After it gets a retransmission FreeBSD 11 process the reset.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_or/sctp-sr-c-or-v-16-1.pkt

FreeBSD allows User to issue OUTGOING_SSN_RESET while reconfig_timer is running

FreeBSD should send same response to a retransmitted request, but for ADD_INCOMIN_STREAMS FreeBSD send only response parameter, not ADD_OUTGOING_STREAMS like in the original answer

If an endpoint gets an ADD_INCOMING_STREAMS Request it must answer with a ADD_OUTGOING_STREAMS Request and a Response parametere. Because they can't put together in one reconfig chunk they must be send in two different chunks. If a Requests is received a second time, the endpoint must send the same reconfig chunk as response than to the first answer. In case of ADD_INCOMING_STREAMS are two chunks send but only one is send in response to the second request. That is no big problem because the requests would be retransmitted when the reconfig timer expires.

see https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rc/sctp-sr-c-rc-v-14-5.pkt

FreeBSD 10.3 doesn't send Errorchunk in every response to data chunk to invalid stream id

In some testcases it is nessesary to prove that all streams are added or reseted. For such tests therer will be packets received which are send to streams that doesn't exist. In that case FreeBSD should send an ERROR Chunk with invalid stream identifyer. FreeBSD doesn't send this error as response to every packet. It is send only every second time.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_ai/sctp-sr-c-ai-v-1-1.pkt

FreeBSD sends response to SSN_TSN_RESET while DATA is outstanding, but should buffers it and send when DATA is send

When FreeBSD hasn't finished to send DATA for example because fragmentation, and then receives a SSN_TSN_RESET request, FreeBSD performes the reset and send reconfig response before it sends the last fragments. So the other endpoint isn't able to put the data fragments together.
see test
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-2-8.pkt

setsockopt for SCTP_RESET_STREAMS is able to reset sid=10 when assoc has only 10 streams

sctp_assoc_reset_event delivers value for sender- and receiver_next_tsn + 1

socketoption sctp_add_streams returns -1 if both instrms and outstrms are 0

If an Application calls the setsockopt syscall with SCTP_ADD_STREAMS option to add 0 new incoming and 0 new outgoing streams, the syscall returns an error. The RFC doen't make any constraint for that values unless the limit of max streams. So that means that this would be a valid call.
Besides that both values 0 could be a legal combination without any effect.
see https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-as/sctp-sr-api-as-v-5-1.pkt

FreeBSD sends response with result 1 "performed" for incoming_ssn_reset while DATA is outstanding but should send 6 "in progress" and after finishing outgoing_ssn_reset"

If FreeBSD receives an INCOMING SSN RESET while it has DATA outstanding because of fragmentation or other things, it send a reconfig Response with result 1 "performed". After FreeBSD has finished DATA transfer it send the OUTGOING_SSN_RESET. Thats not like RFC said, because of the aditional response. In my opinion is a better way to send a response with result 6 "in progress" like when receiving OUTGOING_SSN_RESET. Thats would use the same way like the other request.
see test
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-2-2.pkt

FreeBSD doesn't stop reconfig timer for SSN_TSN_RESET when receiving OUTGOING_SSN_RESET with correct resp_sn

The RFC 6525 says for the resp_sn field in Outgoing SSN Reset Request parameter, that an endpoint who receives it, must mark the request sequence number as acknowledged and stop if nessesary the reconfig Timer. FreeBSD doesn't mark the request sequence number as acknowledged if it belongs to a SSN/TSN Reset request.
see Test
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-5-2.pkt

SUT doesn't fill fields sender_-/ receiver_next_tsn in reconfig_response when result 2 denied is respond to ssn_tsn_reset

If FreeBSD receives a SSN_TSN_RESET request but the implemenation hasn't allowed to process them, FreeBSD answers with a reconfig response without the additional fields sender_/receiver_next_tsn. If FreeBSD sends a result indicating an error both fields are added to the response parameter.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-2-20.pkt

RFC Messageflow for ADD_INCOMING_STREAMS mustbe add with RECONFIG_RESPONSE

The messageflow in RFC 6525 for Add Incoming Streams Requests is worng. In the messageflow showed in RFC 6525 there is a Reconfig Response missing which send the receiver of Add Incoming Streams Request. If it is missing, there is now way to stop the reconfig timer which is running for the Add Incoming Streams request. So the best way is to combine the Add Outgoing Stream Request with a Reconfig Response parameter in one Reconfig Chunk. So this combination must be add to the allowed combinations in the RFC.
E-A E-Z
----------------[RE-CONFIG(ADD_IN_STRMS:X/3)]----------------->
<----[RE-CONFIG(ADD_OUT_STRMS-REQ:Y/3,RESP:X)]------
---------------------------[RE-CONFIG(RESP:Y)]----------------------->
Else there is no information to stop reconfig timer. Therefore the combination of ADD_OUTGOING_STREAMS and RESPONSE must be put in list of allowed combinations of parameter.
see tests.
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-2-14.pkt

FreeBSD doesn't touch reconfig requests third parameter.

If FreeBSD receives a reconfig chunk with three parameters, it processes the first and the secodn parameter correctly. But it doesn't recognises that there is a third one. In Fact that there are only two parameters allowed, this reaction is ok. In my opinion the implementation can send error because only two parameters are allowed
see test
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-ip/sctp-sr-i-ip-i-4-1.pkt

setsockopt SCTP_RESET_STREAMS copies dupplicate sids in sids_list in INCOMING_SSN_RESET

FreeBSD doesn't copies Stream ids from incoming_ssn_reset when all stream ids are in the list

RFC 6525 says for process of INCOMING SSN RESET that the receiver must copy all stream ids from the INCOMING to the OUTGOING SSN RESET requests. FreeBSD doesn't copy the stream ids if the INCOMING SSN RESET wants to reset all streams. Thats no functional error because no streams in the requests means all streams, but it is not implemented like defined in RFC.
see
https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-se/sctp-sr-api-se-v-5-8.pkt

FreeBSD sends empty reconfig chunk and second reconfig Chunk with RESPONSE as response to ADD_INCOMING_STREAMS with 0 new streams

When FreeBSD receives an ADD_INCOMING_STREAMS request with 0 new streams, it responses with a reconfig response parameter and a scond empty reconfig chunk.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-4-4.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-6-4.pkt

SUT send outgoing_ssn_reset with one stream_id, then Tester wants to reset another incoming stream_id. SUT should process the second request normaly, but send only reconfig response

If an endpoint sends an OUTGOING_SSN_RESET and receives then an INCOMING_SSN_RESET for other streams then in the OUTGOING_SSN_RESET request, the endpoint should process the INCOMING_SSN_RESET request normaly. FreeBSD answers to the INCOMING_SSN_RESET with a reconfig response and send an OUTGOING_SSN_RESET request after the first is finished. FreeBSD must immediately send the second OUTGOING_SSN_RESET request
see https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_ir/sctp-sr-c-ir-v-9-1.pkt
for more details

FreeBSD denied incoming ssn_tsn_reset if SCTP_ENABLE_RESET_ASSOC_REQ is enabled

An application can enable SCTP_ENABLE_RESET_ASSOC_REQ flag to allow the implementation to process incoming SSN_TSN_RESET requests. In FreeBSD the implementation deny any incoming SSN_TSN_RESET requests if this flag is enable. But if SCTP_ENABLE_CHANGE_ASSOC_REQ is enabled than SUT delivers result 1 successful.

see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_sr/sctp-sr-c-sr-v-7-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_sr/sctp-sr-c-sr-v-9-1.pkt

FreeBSD send in state Cookie_WAIT reconfig response with result 5 "bad sequence number" to all reconfig requests

FreeBSD can handle DATA bundled with reconfig_requests which uses reseted or added streams

If an endpoint send DATA and a Reconfig requests in one sctp packet, FreeBSD can handle the DATA packets only if they use the values like tsn and ssn after performing the reconfig request. This means in case of an OUTGOING SSN RESET request the DATA in the packet must use the new SSNs after the reset.
see test
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-7-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-7-2.pkt

FreeBSD doesn't check type for different requests with same req_sn

If FreeBSD gets two Reconfig requests with the same reconfig request sequence number, FreeBSD send the same response to the second request than to the first. This is a RFC like reaction.

see tests sctp-sr-i-pv-13-1 to sctp-sr-i-pv-13-20
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-13-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-13-2.pkt
....

setsockopt SCTP_RESET_STREAMS copies, if all stream_id are in stream_list, to the INCOMING_SSN_RESET request. list on wire should be empty

If an application calls the socketoption SCTP_RESET_STREMS with all existing stream ids for an INCOMING_SSN_RESET request, the implementation sends a requests with all stream ids in the list. If the application calls the syscall for an OUTGOING_SSN_RESET requests, the implementation sends an empty list. This reaction is not a big problem because it results in the same reset of all streams, but a similar reaction of both ways (INCOMIN and OUTGOING requests) would be nice.
see
https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-rs/sctp-sr-api-rs-v-6-7.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-rs/sctp-sr-api-rs-v-6-9.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-rs/sctp-sr-api-rs-v-6-25.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-rs/sctp-sr-api-rs-v-6-27.pkt

FreeBSD Head r300201 doesn't send Response after reaching cum_tsn_point=last_tsn in state "deferred reset processing". FreeBSD send only SACK otherwise as FreeBSD 10.3

When an endpoint receives an OUTGOING_SSN_RESET with last_tsn > cum_tsn it must enter state deferred reset processing. When it gets all TSNs that cum_tsn >= last_tsn it must leave the state and must perform the reset. FreeBSD r300201 doesn't send a response after it gets the last TSNs.
see
https://github.com/nplab/RFC6525_Testsuite/blob/master/api_tests/sctp-sr-api-se/sctp-sr-api-se-v-2-6.pkt

FreeBSD doesn't stop reconfig timer if two reconfig requests in one reconfig chunk is descending order

This Issue describes that FreeBSD doesn't stops the reconfig Timer if two reconfig requests are send out and are answered in two different reconfig chunks in decending order. FreeBSD should mark both reconfig request sequence numbers as acknowledged and should stop the reconfig Timer after geting the second response.
see tests
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-12-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-12-2.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-12-3.pkt

When processing OUTGOING_SSN_RESET with higher last_tsn SUT enters "deferred reset processing". When cum_tsn_point = last_tsn SUT sends two reconfig response parameter (one result 6 one result 1).

If FreeBSD 10.3 leaves the state deferred reset processing because fo receiving DATA with tsn = last_tsn, FreeBSD send two reconfig response parameter for the same request sequence number. The first has got result 6 "in progress" and the second the result "performed". Only the second parameter is nessesary. There is no negative effect of this error.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_or/sctp-sr-c-or-v-13-1.pkt

FreeBSD doesn't send in response to OUTGOING_SSN_RESET a response with result 4 already in progress

The result code 4 "alread in progress" is specified in RFC6525 but isn't used for any request type. It make sense to use the result code if an endpoint is in state deffered reset processing and receives a OUTGOING_SSN_RESET with same stream ids than the previous request wants to reset.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-2-5.pkt

SUT doesn't restarts reconfig timer when geting response with result 6 for INCOMING_SSN_RESET, ADD_OUTGOING_STREAMS and ADD_INCOMING_STREAMS

For a Reconfig Response with result 6 "in progress" SUT at first should stop the reconfig timer, them mark the Request sequence number as acknowledged and then restart the reconfig timer. In case of the reconfig timer runs for a INCOMING_SSN_RESET, ADD_OUTGOING_STREAMS and ADD_INCOMING_STREAMS the reconfig timer is not restarted.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-10-2.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-10-4.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-10-5.pkt

FreeBSD increases error count for retransmitts although Tester sends reconfig response with result 6 "in progress"

When an Implementation receives a reconfig Response with the result 6 "in progress" the SUT must start the reconfig timer again after stoping it befor. When the reconfig timer expires the SUT must retransmitt the request but doesn't increment the error counter for the endpoint. FreeBSD increments the error count after receiving such a response.

see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-10-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_rr/sctp-sr-c-rr-v-10-3.pkt

SUT should queue any userdata till peer send RECONFIG_RESPONSE, but SUT send DATA while reconfigt-timer is running for SSN_TSN_RESET

If an application issues a reconfig request, any new userdata, which should be send, must be queued and released after reconfig request is finished. In case of SSN_TSN_RESET the application can send new userdata while the reconfig timer is running.
see also https://github.com/nplab/RFC6525_Testsuite/blob/master/conformance_tests/sctp_sr_c_sr/sctp-sr-c-sr-v-3-1.pkt

FreeBSD doesn't check stream ids in OUTGOING_SSN_RESET. Higher sids than available will be processed

If an other endpoint sends an Outgoing ssn reset request with stream ids, which are higher than the number of existing streams, FreeBSD send a reconfig response with result code 1 performed. SUT should send a response which denies the requests like it do when receiving INCOMING_SSN_RESET with higher sids
see tests
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-pv/sctp-sr-i-pv-i-3-1.pkt

FreeBSD response to requests with req_sn= initial req_sn -1 with 0 "nothing to do" but should send 5 "bad sequence number"

FreeBSD accept OUTGOING_SSN_RESET as successful acknowledment for OUTGOING_SSN_RESET and ADD_OUTGOING_STREAMS

The RFC 6525 says for the resp_sn field in Outgoing SSN Reset Request parameter, that an endpoint who receives it, must mark the request sequence number as acknowledged and stop if nessesary the reconfig Timer. There is no word for performing the whole actions like when receiving a reconfig response. FreeBSD performes the reset like OUTGOING SSN RESET when receiving an OUTGOING SSN RESET with the response sequence number for a OUTGOING SSN RESET. If the response sequence number belongs to an ADD OUTGOING STREAMS Request, FreeBSD adds the new streams.
That is a problem is a Response with a deny is lost on wire or a new OUTGOING SSN RESET is faster than the response. So the SUT performes a requests which is nor successful performed.
see test
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-5-1.pkt
https://github.com/nplab/RFC6525_Testsuite/blob/master/implementation_tests/sctp-sr-i-mf/sctp-sr-i-mf-i-5-3.pkt

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.