mediasoup 3.20.0 → 3.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/lib/Consumer.d.ts.map +1 -1
- package/node/lib/Consumer.js +5 -4
- package/node/lib/DataConsumer.d.ts +2 -3
- package/node/lib/DataConsumer.d.ts.map +1 -1
- package/node/lib/DataConsumer.js +10 -7
- package/node/lib/DataConsumerTypes.d.ts +5 -4
- package/node/lib/DataConsumerTypes.d.ts.map +1 -1
- package/node/lib/DataProducer.d.ts.map +1 -1
- package/node/lib/DataProducer.js +2 -1
- package/node/lib/PipeTransport.d.ts.map +1 -1
- package/node/lib/PipeTransport.js +5 -4
- package/node/lib/PlainTransport.d.ts.map +1 -1
- package/node/lib/PlainTransport.js +6 -5
- package/node/lib/Producer.d.ts.map +1 -1
- package/node/lib/Producer.js +4 -3
- package/node/lib/Router.js +1 -1
- package/node/lib/WebRtcTransport.d.ts.map +1 -1
- package/node/lib/WebRtcTransport.js +6 -5
- package/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/degrade-request.js +124 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +102 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts +21 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts.map +1 -0
- package/node/lib/fbs/data-consumer/send-response.js +91 -0
- package/node/lib/fbs/data-consumer.d.ts +1 -0
- package/node/lib/fbs/data-consumer.d.ts.map +1 -1
- package/node/lib/fbs/data-consumer.js +4 -1
- package/node/lib/fbs/producer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/producer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/producer/degrade-request.js +124 -0
- package/node/lib/fbs/response/body.d.ts +7 -5
- package/node/lib/fbs/response/body.d.ts.map +1 -1
- package/node/lib/fbs/response/body.js +7 -3
- package/node/lib/fbs/response/response.d.ts +3 -2
- package/node/lib/fbs/response/response.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +5 -5
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +102 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +102 -0
- package/node/lib/fbs/worker/close-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-notification.js +78 -0
- package/node/lib/fbs/worker/close-request.d.ts +18 -0
- package/node/lib/fbs/worker/close-request.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-request.js +78 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-worker-notification.js +78 -0
- package/node/lib/sctpParametersTypes.d.ts +23 -0
- package/node/lib/sctpParametersTypes.d.ts.map +1 -1
- package/node/lib/test/test-Consumer.js +194 -0
- package/node/lib/test/test-DataConsumer.js +6 -0
- package/node/lib/test/test-Router.js +11 -0
- package/node/lib/test/test-werift-sctp.js +7 -0
- package/npm-scripts.mjs +2 -2
- package/package.json +7 -6
- package/worker/Makefile +5 -1
- package/worker/deps/libwebrtc/meson.build +5 -1
- package/worker/fbs/dataConsumer.fbs +4 -0
- package/worker/fbs/response.fbs +1 -0
- package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +2 -2
- package/worker/include/Channel/ChannelMessageRegistrator.hpp +4 -3
- package/worker/include/Channel/ChannelNotification.hpp +0 -4
- package/worker/include/Channel/ChannelRequest.hpp +3 -4
- package/worker/include/DepLibSRTP.hpp +2 -2
- package/worker/include/RTC/ActiveSpeakerObserver.hpp +2 -2
- package/worker/include/RTC/AudioLevelObserver.hpp +2 -2
- package/worker/include/RTC/Consumer.hpp +1 -1
- package/worker/include/RTC/DataConsumer.hpp +2 -2
- package/worker/include/RTC/DtlsTransport.hpp +4 -4
- package/worker/include/RTC/ICE/IceServer.hpp +2 -2
- package/worker/include/RTC/ICE/StunPacket.hpp +34 -34
- package/worker/include/RTC/KeyFrameRequestManager.hpp +3 -3
- package/worker/include/RTC/Parameters.hpp +2 -2
- package/worker/include/RTC/PipeConsumer.hpp +6 -5
- package/worker/include/RTC/PlainTransport.hpp +0 -1
- package/worker/include/RTC/PortManager.hpp +92 -12
- package/worker/include/RTC/Producer.hpp +7 -6
- package/worker/include/RTC/RTCP/Feedback.hpp +1 -2
- package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +2 -2
- package/worker/include/RTC/RTCP/Packet.hpp +2 -2
- package/worker/include/RTC/RTCP/Sdes.hpp +1 -1
- package/worker/include/RTC/RTP/Codecs/DependencyDescriptor.hpp +2 -1
- package/worker/include/RTC/RTP/Packet.hpp +57 -57
- package/worker/include/RTC/RTP/ProbationGenerator.hpp +2 -2
- package/worker/include/RTC/RTP/SharedPacket.hpp +4 -4
- package/worker/include/RTC/Router.hpp +12 -11
- package/worker/include/RTC/RtcLogger.hpp +2 -2
- package/worker/include/RTC/RtpDictionaries.hpp +6 -6
- package/worker/include/RTC/RtpListener.hpp +4 -4
- package/worker/include/RTC/SCTP/association/Association.hpp +13 -13
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +2 -2
- package/worker/include/RTC/SCTP/association/NegotiatedCapabilities.hpp +2 -2
- package/worker/include/RTC/SCTP/association/PacketSender.hpp +3 -3
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +9 -9
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +4 -4
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +24 -24
- package/worker/include/RTC/SCTP/association/TransmissionControlBlockContextInterface.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/Chunk.hpp +86 -86
- package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +18 -18
- package/worker/include/RTC/SCTP/packet/Packet.hpp +33 -33
- package/worker/include/RTC/SCTP/packet/Parameter.hpp +24 -24
- package/worker/include/RTC/SCTP/packet/TLV.hpp +13 -13
- package/worker/include/RTC/SCTP/packet/UserData.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/chunks/AbortAssociationChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/AnyDataChunk.hpp +9 -9
- package/worker/include/RTC/SCTP/packet/chunks/AnyForwardTsnChunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/chunks/CookieAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/CookieEchoChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +11 -11
- package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatAckChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +8 -8
- package/worker/include/RTC/SCTP/packet/chunks/OperationErrorChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/ReConfigChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/UnknownChunk.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/UnknownErrorCause.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/UnknownParameter.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationListenerInterface.hpp +26 -26
- package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +7 -7
- package/worker/include/RTC/SCTP/public/Message.hpp +1 -1
- package/worker/include/RTC/SCTP/public/SctpOptions.hpp +4 -4
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +10 -10
- package/worker/include/RTC/SCTP/rx/DataTracker.hpp +1 -1
- package/worker/include/RTC/SCTP/rx/ReassemblyStreamsInterface.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +39 -39
- package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +14 -14
- package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +1 -1
- package/worker/include/RTC/SctpListener.hpp +2 -2
- package/worker/include/RTC/SimulcastConsumer.hpp +2 -1
- package/worker/include/RTC/TcpServer.hpp +3 -2
- package/worker/include/RTC/Transport.hpp +8 -8
- package/worker/include/RTC/UdpSocket.hpp +3 -2
- package/worker/include/RTC/WebRtcServer.hpp +4 -5
- package/worker/include/RTC/WebRtcTransport.hpp +2 -2
- package/worker/include/Settings.hpp +3 -3
- package/worker/include/Worker.hpp +3 -3
- package/worker/include/handles/TcpServerHandle.hpp +2 -2
- package/worker/meson.build +9 -4
- package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +4 -3
- package/worker/src/Channel/ChannelNotification.cpp +5 -4
- package/worker/src/Channel/ChannelRequest.cpp +9 -6
- package/worker/src/DepLibSRTP.cpp +1 -1
- package/worker/src/RTC/AudioLevelObserver.cpp +2 -2
- package/worker/src/RTC/DataConsumer.cpp +13 -3
- package/worker/src/RTC/DataProducer.cpp +1 -1
- package/worker/src/RTC/DtlsTransport.cpp +3 -3
- package/worker/src/RTC/ICE/IceServer.cpp +1 -1
- package/worker/src/RTC/ICE/StunPacket.cpp +77 -77
- package/worker/src/RTC/PipeTransport.cpp +5 -4
- package/worker/src/RTC/PlainTransport.cpp +9 -8
- package/worker/src/RTC/PortManager.cpp +174 -114
- package/worker/src/RTC/Producer.cpp +0 -1
- package/worker/src/RTC/RTCP/Feedback.cpp +6 -6
- package/worker/src/RTC/RTCP/FeedbackPs.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsPli.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +2 -2
- package/worker/src/RTC/RTCP/FeedbackRtp.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpSrReq.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +2 -2
- package/worker/src/RTC/RTCP/Packet.cpp +2 -2
- package/worker/src/RTC/RTCP/Sdes.cpp +1 -1
- package/worker/src/RTC/RTP/Codecs/DependencyDescriptor.cpp +2 -1
- package/worker/src/RTC/RTP/Packet.cpp +68 -68
- package/worker/src/RTC/RTP/ProbationGenerator.cpp +3 -3
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +3 -3
- package/worker/src/RTC/RTP/RtxStream.cpp +2 -2
- package/worker/src/RTC/RTP/SharedPacket.cpp +4 -4
- package/worker/src/RTC/Router.cpp +5 -5
- package/worker/src/RTC/RtcLogger.cpp +1 -1
- package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +4 -4
- package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +2 -3
- package/worker/src/RTC/SCTP/association/Association.cpp +100 -97
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +6 -6
- package/worker/src/RTC/SCTP/association/NegotiatedCapabilities.cpp +3 -3
- package/worker/src/RTC/SCTP/association/PacketSender.cpp +1 -1
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +2 -2
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +5 -5
- package/worker/src/RTC/SCTP/packet/Chunk.cpp +52 -52
- package/worker/src/RTC/SCTP/packet/ErrorCause.cpp +14 -14
- package/worker/src/RTC/SCTP/packet/Packet.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/Parameter.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/TLV.cpp +8 -8
- package/worker/src/RTC/SCTP/packet/chunks/AbortAssociationChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/CookieAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/CookieEchoChunk.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatAckChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/InitAckChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/InitChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/OperationErrorChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ReConfigChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/CookiePreservativeParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/IPv4AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IPv6AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +8 -8
- package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +1 -1
- package/worker/src/RTC/SvcConsumer.cpp +6 -2
- package/worker/src/RTC/TcpServer.cpp +4 -4
- package/worker/src/RTC/Transport.cpp +42 -19
- package/worker/src/RTC/UdpSocket.cpp +4 -4
- package/worker/src/RTC/WebRtcServer.cpp +8 -8
- package/worker/src/RTC/WebRtcTransport.cpp +9 -8
- package/worker/src/Settings.cpp +2 -2
- package/worker/src/lib.cpp +1 -2
- package/worker/subprojects/packagefiles/ankerl-unordered-dense/meson.build +5 -0
- package/worker/subprojects/unordered-dense.wrap +9 -0
- package/worker/tasks.py +293 -196
- package/worker/test/src/RTC/ICE/TestStunPacket.cpp +22 -22
- package/worker/test/src/RTC/ICE/iceCommon.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpEcn.cpp +8 -8
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpNack.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpSrReq.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTllei.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestSenderReport.cpp +1 -1
- package/worker/test/src/RTC/RTP/TestPacket.cpp +26 -26
- package/worker/test/src/RTC/RTP/TestSharedPacket.cpp +1 -1
- package/worker/test/src/RTC/RTP/rtpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/association/TestNegotiatedCapabilities.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +14 -14
- package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieEchoChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +9 -9
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +8 -8
- package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownCompleteChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestUnknownChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestCookieReceivedWhileShuttingDownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidMandatoryParameterErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidStreamIdentifierErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +11 -11
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddIncomingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddOutgoingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestCookiePreservativeParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSsnTsnResetRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestStateCookieParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedAddressTypesParameter.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnknownParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnrecognizedParameterParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestZeroChecksumAcceptableParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/sctpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +3 -3
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +1 -1
- package/worker/test/src/RTC/TestNackGenerator.cpp +1 -1
- package/worker/test/src/RTC/TestPortManager.cpp +126 -0
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +2 -2
- package/worker/test/src/RTC/TestTransportTuple.cpp +3 -2
- package/worker/test/src/Utils/TestCrypto.cpp +3 -3
- package/worker/test/src/Utils/TestString.cpp +1 -1
|
@@ -186,7 +186,7 @@ namespace RTC
|
|
|
186
186
|
// SCTP state will no longer be "NEW".
|
|
187
187
|
if (this->state != State::NEW)
|
|
188
188
|
{
|
|
189
|
-
MS_DEBUG_DEV("internal
|
|
189
|
+
MS_DEBUG_DEV("internal association state is not NEW, ignoring");
|
|
190
190
|
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
@@ -210,7 +210,7 @@ namespace RTC
|
|
|
210
210
|
{
|
|
211
211
|
MS_TRACE();
|
|
212
212
|
|
|
213
|
-
// NOTE: We only accept NEW state here so once the
|
|
213
|
+
// NOTE: We only accept NEW state here so once the association is closed
|
|
214
214
|
// it cannot be reused. However there is no real technical reason for it.
|
|
215
215
|
if (this->state != State::NEW)
|
|
216
216
|
{
|
|
@@ -218,7 +218,7 @@ namespace RTC
|
|
|
218
218
|
|
|
219
219
|
MS_WARN_TAG(
|
|
220
220
|
sctp,
|
|
221
|
-
"cannot initiate the
|
|
221
|
+
"cannot initiate the association since internal state is not NEW but %.*s",
|
|
222
222
|
static_cast<int>(stateStringView.size()),
|
|
223
223
|
stateStringView.data());
|
|
224
224
|
|
|
@@ -264,7 +264,7 @@ namespace RTC
|
|
|
264
264
|
if (this->tcb)
|
|
265
265
|
{
|
|
266
266
|
// TODO: dcsctp: Remove this check, as it just hides the problem that the
|
|
267
|
-
//
|
|
267
|
+
// association can transition from ShutdownSent to ShutdownPending, or
|
|
268
268
|
// from ShutdownAckSent to ShutdownPending, which is illegal.
|
|
269
269
|
//
|
|
270
270
|
// @see https://issues.webrtc.org/issues/42222897
|
|
@@ -282,7 +282,7 @@ namespace RTC
|
|
|
282
282
|
}
|
|
283
283
|
// Association closed before even starting to connect, or during the
|
|
284
284
|
// initial connection phase. There is no outstanding data, so the
|
|
285
|
-
//
|
|
285
|
+
// association can just be closed (stopping any timers, if any), as this
|
|
286
286
|
// is the application's intention when calling Shutdown().
|
|
287
287
|
else
|
|
288
288
|
{
|
|
@@ -311,7 +311,7 @@ namespace RTC
|
|
|
311
311
|
auto* abortAssociationChunk = packet->BuildChunkInPlace<AbortAssociationChunk>();
|
|
312
312
|
|
|
313
313
|
// NOTE: Don't set bit T in the ABORT chunk since TCB knows the
|
|
314
|
-
//
|
|
314
|
+
// verification tag expected by the remote.
|
|
315
315
|
|
|
316
316
|
auto* userInitiatedAbortErrorCause =
|
|
317
317
|
abortAssociationChunk->BuildErrorCauseInPlace<UserInitiatedAbortErrorCause>();
|
|
@@ -565,7 +565,7 @@ namespace RTC
|
|
|
565
565
|
|
|
566
566
|
if (!ValidateReceivedPacket(receivedPacket.get()))
|
|
567
567
|
{
|
|
568
|
-
MS_WARN_TAG(sctp, "
|
|
568
|
+
MS_WARN_TAG(sctp, "packet verification failed, discarded");
|
|
569
569
|
|
|
570
570
|
return;
|
|
571
571
|
}
|
|
@@ -670,7 +670,7 @@ namespace RTC
|
|
|
670
670
|
if (state == this->state)
|
|
671
671
|
{
|
|
672
672
|
MS_WARN_DEV(
|
|
673
|
-
"SCTP
|
|
673
|
+
"SCTP association internal state is already %.*s (message:\"%.*s\")",
|
|
674
674
|
static_cast<int>(stateStringView.size()),
|
|
675
675
|
stateStringView.data(),
|
|
676
676
|
static_cast<int>(message.size()),
|
|
@@ -683,7 +683,7 @@ namespace RTC
|
|
|
683
683
|
|
|
684
684
|
MS_DEBUG_TAG(
|
|
685
685
|
sctp,
|
|
686
|
-
"SCTP
|
|
686
|
+
"SCTP association internal state changed from %.*s to %.*s (message:\"%.*s\")",
|
|
687
687
|
static_cast<int>(previousStateStringView.size()),
|
|
688
688
|
previousStateStringView.data(),
|
|
689
689
|
static_cast<int>(stateStringView.size()),
|
|
@@ -804,7 +804,7 @@ namespace RTC
|
|
|
804
804
|
|
|
805
805
|
auto packet = CreatePacket();
|
|
806
806
|
|
|
807
|
-
// Insert an INIT
|
|
807
|
+
// Insert an INIT chunk in the packet.
|
|
808
808
|
auto* initChunk = packet->BuildChunkInPlace<InitChunk>();
|
|
809
809
|
|
|
810
810
|
initChunk->SetInitiateTag(this->preTcb.localVerificationTag);
|
|
@@ -813,7 +813,7 @@ namespace RTC
|
|
|
813
813
|
initChunk->SetNumberOfInboundStreams(this->sctpOptions.announcedMaxInboundStreams);
|
|
814
814
|
initChunk->SetInitialTsn(this->preTcb.localInitialTsn);
|
|
815
815
|
|
|
816
|
-
// Insert capabilities related
|
|
816
|
+
// Insert capabilities related parameters in the INIT chunk.
|
|
817
817
|
AddCapabilitiesParametersToInitOrInitAckChunk(initChunk);
|
|
818
818
|
|
|
819
819
|
initChunk->Consolidate();
|
|
@@ -1065,11 +1065,11 @@ namespace RTC
|
|
|
1065
1065
|
{
|
|
1066
1066
|
MS_WARN_TAG(
|
|
1067
1067
|
sctp,
|
|
1068
|
-
"
|
|
1068
|
+
"packet with verification tag 0 must have a single chunk and it must be an INIT chunk, packet discarded");
|
|
1069
1069
|
|
|
1070
1070
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1071
1071
|
Types::ErrorKind::PARSE_FAILED,
|
|
1072
|
-
"packet with
|
|
1072
|
+
"packet with verification tag 0 must have a single chunk and it must be an INIT chunk");
|
|
1073
1073
|
|
|
1074
1074
|
return false;
|
|
1075
1075
|
}
|
|
@@ -1087,7 +1087,7 @@ namespace RTC
|
|
|
1087
1087
|
const auto* abortAssociationChunk =
|
|
1088
1088
|
static_cast<const AbortAssociationChunk*>(receivedPacket->GetChunkAt(0));
|
|
1089
1089
|
|
|
1090
|
-
// We cannot verify the
|
|
1090
|
+
// We cannot verify the verification tag so assume it's okey.
|
|
1091
1091
|
if (abortAssociationChunk->GetT() && !this->tcb)
|
|
1092
1092
|
{
|
|
1093
1093
|
return true;
|
|
@@ -1104,11 +1104,12 @@ namespace RTC
|
|
|
1104
1104
|
{
|
|
1105
1105
|
MS_WARN_TAG(
|
|
1106
1106
|
sctp,
|
|
1107
|
-
"ABORT
|
|
1107
|
+
"receievd ABORT chunk has invalid verification tag %" PRIu32 ", packet discarded",
|
|
1108
1108
|
receivedPacket->GetVerificationTag());
|
|
1109
1109
|
|
|
1110
1110
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1111
|
-
Types::ErrorKind::PARSE_FAILED,
|
|
1111
|
+
Types::ErrorKind::PARSE_FAILED,
|
|
1112
|
+
"received packet with ABORT chunk has invalid verification tag");
|
|
1112
1113
|
|
|
1113
1114
|
return false;
|
|
1114
1115
|
}
|
|
@@ -1124,13 +1125,14 @@ namespace RTC
|
|
|
1124
1125
|
{
|
|
1125
1126
|
MS_WARN_TAG(
|
|
1126
1127
|
sctp,
|
|
1127
|
-
"
|
|
1128
|
+
"received INIT-ACK chunk has invalid verification tag %" PRIu32 " (should be %" PRIu32
|
|
1129
|
+
"), packet discarded",
|
|
1128
1130
|
receivedPacket->GetVerificationTag(),
|
|
1129
1131
|
this->preTcb.localVerificationTag);
|
|
1130
1132
|
|
|
1131
1133
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1132
1134
|
Types::ErrorKind::PARSE_FAILED,
|
|
1133
|
-
"packet with
|
|
1135
|
+
"received packet with INIT-ACK chunk has invalid verification tag");
|
|
1134
1136
|
|
|
1135
1137
|
return false;
|
|
1136
1138
|
}
|
|
@@ -1156,7 +1158,7 @@ namespace RTC
|
|
|
1156
1158
|
const auto* shutdownCompleteChunk =
|
|
1157
1159
|
static_cast<const ShutdownCompleteChunk*>(receivedPacket->GetChunkAt(0));
|
|
1158
1160
|
|
|
1159
|
-
// We cannot verify the
|
|
1161
|
+
// We cannot verify the verification tag so assume it's okey.
|
|
1160
1162
|
if (shutdownCompleteChunk->GetT() && !this->tcb)
|
|
1161
1163
|
{
|
|
1162
1164
|
return true;
|
|
@@ -1173,12 +1175,13 @@ namespace RTC
|
|
|
1173
1175
|
{
|
|
1174
1176
|
MS_WARN_TAG(
|
|
1175
1177
|
sctp,
|
|
1176
|
-
"
|
|
1178
|
+
"received SHUTDOWN-COMPLETE chunk has invalid verification tag %" PRIu32
|
|
1179
|
+
", packet discarded",
|
|
1177
1180
|
receivedPacket->GetVerificationTag());
|
|
1178
1181
|
|
|
1179
1182
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1180
1183
|
Types::ErrorKind::PARSE_FAILED,
|
|
1181
|
-
"packet with
|
|
1184
|
+
"received packet with SHUTDOWN-COMPLETE chunk has invalid verification tag");
|
|
1182
1185
|
|
|
1183
1186
|
return false;
|
|
1184
1187
|
}
|
|
@@ -1200,12 +1203,13 @@ namespace RTC
|
|
|
1200
1203
|
{
|
|
1201
1204
|
MS_WARN_TAG(
|
|
1202
1205
|
sctp,
|
|
1203
|
-
"invalid
|
|
1206
|
+
"received packet has invalid verification tag %" PRIu32 " (should be %" PRIu32
|
|
1207
|
+
"), packet discarded",
|
|
1204
1208
|
receivedPacket->GetVerificationTag(),
|
|
1205
1209
|
localVerificationTag);
|
|
1206
1210
|
|
|
1207
1211
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1208
|
-
Types::ErrorKind::PARSE_FAILED, "packet has invalid
|
|
1212
|
+
Types::ErrorKind::PARSE_FAILED, "packet has invalid verification tag");
|
|
1209
1213
|
|
|
1210
1214
|
return false;
|
|
1211
1215
|
}
|
|
@@ -1369,7 +1373,7 @@ namespace RTC
|
|
|
1369
1373
|
// be 0, the receiver MUST silently discard the packet."
|
|
1370
1374
|
if (receivedInitChunk->GetInitiateTag() == 0)
|
|
1371
1375
|
{
|
|
1372
|
-
MS_WARN_TAG(sctp, "invalid value 0 in Initiate
|
|
1376
|
+
MS_WARN_TAG(sctp, "invalid value 0 in Initiate Tag in received INIT chunk, packet discarded");
|
|
1373
1377
|
|
|
1374
1378
|
return;
|
|
1375
1379
|
}
|
|
@@ -1388,12 +1392,12 @@ namespace RTC
|
|
|
1388
1392
|
{
|
|
1389
1393
|
MS_WARN_TAG(
|
|
1390
1394
|
sctp,
|
|
1391
|
-
"
|
|
1395
|
+
"invalid number of outbound streams or number of inbound streams in received INIT chunk, aborting association");
|
|
1392
1396
|
|
|
1393
1397
|
auto packet = CreatePacketWithVerificationTag(0);
|
|
1394
1398
|
auto* abortAssociationChunk = packet->BuildChunkInPlace<AbortAssociationChunk>();
|
|
1395
1399
|
|
|
1396
|
-
// NOTE: We are not setting the
|
|
1400
|
+
// NOTE: We are not setting the verification tag expected by the peer
|
|
1397
1401
|
// so must set be T to 1.
|
|
1398
1402
|
abortAssociationChunk->SetT(true);
|
|
1399
1403
|
|
|
@@ -1401,7 +1405,7 @@ namespace RTC
|
|
|
1401
1405
|
abortAssociationChunk->BuildErrorCauseInPlace<ProtocolViolationErrorCause>();
|
|
1402
1406
|
|
|
1403
1407
|
protocolViolationErrorCause->SetAdditionalInformation(
|
|
1404
|
-
"invalid value 0 in
|
|
1408
|
+
"invalid value 0 in number of outbound streams or number of inbound streams in received INIT chunk");
|
|
1405
1409
|
|
|
1406
1410
|
protocolViolationErrorCause->Consolidate();
|
|
1407
1411
|
abortAssociationChunk->Consolidate();
|
|
@@ -1423,7 +1427,7 @@ namespace RTC
|
|
|
1423
1427
|
if (this->state == State::SHUTDOWN_ACK_SENT)
|
|
1424
1428
|
{
|
|
1425
1429
|
MS_DEBUG_TAG(
|
|
1426
|
-
sctp, "INIT
|
|
1430
|
+
sctp, "INIT chunk received in SHUTDOWN_ACK_SENT state, retransmitting SHUTDOWN-ACK chunk");
|
|
1427
1431
|
|
|
1428
1432
|
SendShutdownAckChunk();
|
|
1429
1433
|
|
|
@@ -1438,7 +1442,7 @@ namespace RTC
|
|
|
1438
1442
|
{
|
|
1439
1443
|
case State::NEW:
|
|
1440
1444
|
{
|
|
1441
|
-
MS_DEBUG_TAG(sctp, "INIT
|
|
1445
|
+
MS_DEBUG_TAG(sctp, "INIT chunk received in NEW state (normal scenario)");
|
|
1442
1446
|
|
|
1443
1447
|
localVerificationTag =
|
|
1444
1448
|
Utils::Crypto::GetRandomUInt<uint32_t>(MinVerificationTag, MaxVerificationTag);
|
|
@@ -1449,7 +1453,7 @@ namespace RTC
|
|
|
1449
1453
|
|
|
1450
1454
|
case State::CLOSED:
|
|
1451
1455
|
{
|
|
1452
|
-
MS_WARN_TAG(sctp, "ignoring INIT
|
|
1456
|
+
MS_WARN_TAG(sctp, "ignoring INIT chunk received in CLOSED state)");
|
|
1453
1457
|
}
|
|
1454
1458
|
|
|
1455
1459
|
// https://datatracker.ietf.org/doc/html/rfc9260#section-5.2.1
|
|
@@ -1463,7 +1467,7 @@ namespace RTC
|
|
|
1463
1467
|
case State::COOKIE_WAIT:
|
|
1464
1468
|
case State::COOKIE_ECHOED:
|
|
1465
1469
|
{
|
|
1466
|
-
MS_DEBUG_TAG(sctp, "INIT
|
|
1470
|
+
MS_DEBUG_TAG(sctp, "INIT chunk received after sending INIT chunk (collision, no problem)");
|
|
1467
1471
|
|
|
1468
1472
|
localVerificationTag = this->preTcb.localVerificationTag;
|
|
1469
1473
|
localInitialTsn = this->preTcb.localInitialTsn;
|
|
@@ -1484,7 +1488,7 @@ namespace RTC
|
|
|
1484
1488
|
{
|
|
1485
1489
|
AssertHasTcb();
|
|
1486
1490
|
|
|
1487
|
-
MS_DEBUG_TAG(sctp, "INIT
|
|
1491
|
+
MS_DEBUG_TAG(sctp, "INIT chunk received (probably peer restarted)");
|
|
1488
1492
|
|
|
1489
1493
|
localVerificationTag =
|
|
1490
1494
|
Utils::Crypto::GetRandomUInt<uint32_t>(MinVerificationTag, MaxVerificationTag);
|
|
@@ -1496,18 +1500,18 @@ namespace RTC
|
|
|
1496
1500
|
|
|
1497
1501
|
MS_DEBUG_TAG(
|
|
1498
1502
|
sctp,
|
|
1499
|
-
"initiating
|
|
1503
|
+
"initiating association [localVerificationTag:%" PRIu32 ", localInitialTsn:%" PRIu32
|
|
1500
1504
|
", remoteVerificationTag:%" PRIu32 ", remoteInitialTsn:%" PRIu32 "]",
|
|
1501
1505
|
localVerificationTag,
|
|
1502
1506
|
localInitialTsn,
|
|
1503
1507
|
receivedInitChunk->GetInitiateTag(),
|
|
1504
1508
|
receivedInitChunk->GetInitialTsn());
|
|
1505
1509
|
|
|
1506
|
-
/* Send a
|
|
1510
|
+
/* Send a packet with an INIT-ACK chunk. */
|
|
1507
1511
|
|
|
1508
1512
|
auto packet = CreatePacketWithVerificationTag(receivedInitChunk->GetInitiateTag());
|
|
1509
1513
|
|
|
1510
|
-
// Insert an
|
|
1514
|
+
// Insert an INIT-ACK chunk in the packet.
|
|
1511
1515
|
auto* initAckChunk = packet->BuildChunkInPlace<InitAckChunk>();
|
|
1512
1516
|
|
|
1513
1517
|
initAckChunk->SetInitiateTag(localVerificationTag);
|
|
@@ -1516,13 +1520,13 @@ namespace RTC
|
|
|
1516
1520
|
initAckChunk->SetNumberOfInboundStreams(this->sctpOptions.announcedMaxInboundStreams);
|
|
1517
1521
|
initAckChunk->SetInitialTsn(localInitialTsn);
|
|
1518
1522
|
|
|
1519
|
-
// Insert a StateCookieParameter in the
|
|
1523
|
+
// Insert a StateCookieParameter in the INIT-ACK chunk.
|
|
1520
1524
|
auto* stateCookieParameter = initAckChunk->BuildParameterInPlace<StateCookieParameter>();
|
|
1521
1525
|
|
|
1522
1526
|
const auto negotiatedCapabilities =
|
|
1523
1527
|
NegotiatedCapabilities::Factory(this->sctpOptions, receivedInitChunk);
|
|
1524
1528
|
|
|
1525
|
-
// Write the StateCookie in place in the
|
|
1529
|
+
// Write the StateCookie in place in the parameter.
|
|
1526
1530
|
stateCookieParameter->WriteStateCookieInPlace(
|
|
1527
1531
|
localVerificationTag,
|
|
1528
1532
|
receivedInitChunk->GetInitiateTag(),
|
|
@@ -1534,7 +1538,7 @@ namespace RTC
|
|
|
1534
1538
|
|
|
1535
1539
|
stateCookieParameter->Consolidate();
|
|
1536
1540
|
|
|
1537
|
-
// Insert capabilities related
|
|
1541
|
+
// Insert capabilities related parameters in the INIT-ACK chunk.
|
|
1538
1542
|
AddCapabilitiesParametersToInitOrInitAckChunk(initAckChunk);
|
|
1539
1543
|
|
|
1540
1544
|
initAckChunk->Consolidate();
|
|
@@ -1557,7 +1561,7 @@ namespace RTC
|
|
|
1557
1561
|
// INIT ACK chunk."
|
|
1558
1562
|
if (this->state != State::COOKIE_WAIT)
|
|
1559
1563
|
{
|
|
1560
|
-
MS_DEBUG_TAG(sctp, "ignoring
|
|
1564
|
+
MS_DEBUG_TAG(sctp, "ignoring INIT-ACK chunk when not in COOKIE_WAIT state");
|
|
1561
1565
|
|
|
1562
1566
|
return;
|
|
1563
1567
|
}
|
|
@@ -1567,13 +1571,12 @@ namespace RTC
|
|
|
1567
1571
|
|
|
1568
1572
|
if (!stateCookieParameter || !stateCookieParameter->GetCookie())
|
|
1569
1573
|
{
|
|
1570
|
-
MS_WARN_TAG(
|
|
1571
|
-
sctp, "ignoring received INIT_ACK Chunk without StateCookieParameter or without Cookie");
|
|
1574
|
+
MS_WARN_TAG(sctp, "ignoring INIT-ACK chunk without StateCookieParameter or without cookie");
|
|
1572
1575
|
|
|
1573
1576
|
auto packet = CreatePacketWithVerificationTag(this->preTcb.localVerificationTag);
|
|
1574
1577
|
auto* abortAssociationChunk = packet->BuildChunkInPlace<AbortAssociationChunk>();
|
|
1575
1578
|
|
|
1576
|
-
// NOTE: We are not setting the
|
|
1579
|
+
// NOTE: We are not setting the verification tag expected by the peer
|
|
1577
1580
|
// so must set be T to 1.
|
|
1578
1581
|
abortAssociationChunk->SetT(true);
|
|
1579
1582
|
|
|
@@ -1581,7 +1584,7 @@ namespace RTC
|
|
|
1581
1584
|
abortAssociationChunk->BuildErrorCauseInPlace<ProtocolViolationErrorCause>();
|
|
1582
1585
|
|
|
1583
1586
|
protocolViolationErrorCause->SetAdditionalInformation(
|
|
1584
|
-
"
|
|
1587
|
+
"INIT-ACK without State Cookie parameter or without cookie");
|
|
1585
1588
|
|
|
1586
1589
|
protocolViolationErrorCause->Consolidate();
|
|
1587
1590
|
abortAssociationChunk->Consolidate();
|
|
@@ -1589,7 +1592,7 @@ namespace RTC
|
|
|
1589
1592
|
this->packetSender.SendPacket(packet.get());
|
|
1590
1593
|
|
|
1591
1594
|
InternalClose(
|
|
1592
|
-
Types::ErrorKind::PROTOCOL_VIOLATION, "received
|
|
1595
|
+
Types::ErrorKind::PROTOCOL_VIOLATION, "received INIT-ACK chunk doesn't contain a cookie");
|
|
1593
1596
|
|
|
1594
1597
|
return;
|
|
1595
1598
|
}
|
|
@@ -1602,10 +1605,10 @@ namespace RTC
|
|
|
1602
1605
|
const auto negotiatedCapabilities =
|
|
1603
1606
|
NegotiatedCapabilities::Factory(this->sctpOptions, receivedInitAckChunk);
|
|
1604
1607
|
|
|
1605
|
-
// If the
|
|
1606
|
-
//
|
|
1608
|
+
// If the association is re-established (peer restarted, but re-used old
|
|
1609
|
+
// association), make sure that all message identifiers are reset and any
|
|
1607
1610
|
// partly sent message is re-sent in full. The same is true when the
|
|
1608
|
-
//
|
|
1611
|
+
// association is closed and later re-opened, which never happens in
|
|
1609
1612
|
// WebRTC, but is a valid operation on the SCTP level.
|
|
1610
1613
|
this->sendQueue.Reset();
|
|
1611
1614
|
|
|
@@ -1618,9 +1621,9 @@ namespace RTC
|
|
|
1618
1621
|
/*tieTag*/ Utils::Crypto::GetRandomUInt<uint64_t>(0, MaxTieTag),
|
|
1619
1622
|
negotiatedCapabilities);
|
|
1620
1623
|
|
|
1621
|
-
SetState(State::COOKIE_ECHOED, "
|
|
1624
|
+
SetState(State::COOKIE_ECHOED, "INIT-ACK received");
|
|
1622
1625
|
|
|
1623
|
-
// The
|
|
1626
|
+
// The association isn't fully established just yet. Store the stat
|
|
1624
1627
|
// cookie in the TCB.
|
|
1625
1628
|
std::vector<uint8_t> remoteStateCookie(
|
|
1626
1629
|
stateCookieParameter->GetCookie(),
|
|
@@ -1643,10 +1646,10 @@ namespace RTC
|
|
|
1643
1646
|
|
|
1644
1647
|
if (!receivedCookieEchoChunk->HasCookie())
|
|
1645
1648
|
{
|
|
1646
|
-
MS_WARN_TAG(sctp, "ignoring
|
|
1649
|
+
MS_WARN_TAG(sctp, "ignoring invalid COOKIE-ECHO chunk without cookie");
|
|
1647
1650
|
|
|
1648
1651
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1649
|
-
Types::ErrorKind::PARSE_FAILED, "received
|
|
1652
|
+
Types::ErrorKind::PARSE_FAILED, "received COOKIE-ECHO chunk has no cookie");
|
|
1650
1653
|
|
|
1651
1654
|
return;
|
|
1652
1655
|
}
|
|
@@ -1656,10 +1659,10 @@ namespace RTC
|
|
|
1656
1659
|
|
|
1657
1660
|
if (!cookie)
|
|
1658
1661
|
{
|
|
1659
|
-
MS_WARN_TAG(sctp, "failed to parse
|
|
1662
|
+
MS_WARN_TAG(sctp, "failed to parse cookie in received COOKIE-ECHO chunk");
|
|
1660
1663
|
|
|
1661
1664
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1662
|
-
Types::ErrorKind::PARSE_FAILED, "received
|
|
1665
|
+
Types::ErrorKind::PARSE_FAILED, "received COOKIE-ECHO chunk with invalid cookie");
|
|
1663
1666
|
|
|
1664
1667
|
return;
|
|
1665
1668
|
}
|
|
@@ -1675,11 +1678,11 @@ namespace RTC
|
|
|
1675
1678
|
{
|
|
1676
1679
|
if (receivedPacket->GetVerificationTag() != cookie->GetLocalVerificationTag())
|
|
1677
1680
|
{
|
|
1678
|
-
MS_WARN_TAG(sctp, "received
|
|
1681
|
+
MS_WARN_TAG(sctp, "received COOKIE-ECHO chunk with invalid verification tag");
|
|
1679
1682
|
|
|
1680
1683
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1681
1684
|
Types::ErrorKind::PARSE_FAILED,
|
|
1682
|
-
"received
|
|
1685
|
+
"received COOKIE-ECHO chunk with invalid verification tag");
|
|
1683
1686
|
|
|
1684
1687
|
return;
|
|
1685
1688
|
}
|
|
@@ -1695,17 +1698,17 @@ namespace RTC
|
|
|
1695
1698
|
this->tcb->ClearRemoteStateCookie();
|
|
1696
1699
|
}
|
|
1697
1700
|
|
|
1698
|
-
SetState(State::ESTABLISHED, "
|
|
1701
|
+
SetState(State::ESTABLISHED, "COOKIE-ECHO received");
|
|
1699
1702
|
|
|
1700
1703
|
this->associationListenerDeferrer.OnAssociationConnected();
|
|
1701
1704
|
}
|
|
1702
1705
|
|
|
1703
1706
|
if (!this->tcb)
|
|
1704
1707
|
{
|
|
1705
|
-
// If the
|
|
1706
|
-
//
|
|
1708
|
+
// If the association is re-established (peer restarted, but re-used old
|
|
1709
|
+
// association), make sure that all message identifiers are reset and any
|
|
1707
1710
|
// partly sent message is re-sent in full. The same is true when the
|
|
1708
|
-
//
|
|
1711
|
+
// association is closed and later re-opened, which never happens in
|
|
1709
1712
|
// WebRTC, but is a valid operation on the SCTP level.
|
|
1710
1713
|
this->sendQueue.Reset();
|
|
1711
1714
|
|
|
@@ -1734,7 +1737,7 @@ namespace RTC
|
|
|
1734
1737
|
{
|
|
1735
1738
|
MS_TRACE();
|
|
1736
1739
|
|
|
1737
|
-
MS_DEBUG_DEV("handling
|
|
1740
|
+
MS_DEBUG_DEV("handling COOKIE-ECHO with TCB");
|
|
1738
1741
|
|
|
1739
1742
|
AssertHasTcb();
|
|
1740
1743
|
|
|
@@ -1769,12 +1772,12 @@ namespace RTC
|
|
|
1769
1772
|
|
|
1770
1773
|
this->packetSender.SendPacket(packet.get());
|
|
1771
1774
|
this->associationListenerDeferrer.OnAssociationError(
|
|
1772
|
-
Types::ErrorKind::WRONG_SEQUENCE, "received
|
|
1775
|
+
Types::ErrorKind::WRONG_SEQUENCE, "received COOKIE-ECHO while shutting down");
|
|
1773
1776
|
|
|
1774
1777
|
return false;
|
|
1775
1778
|
}
|
|
1776
1779
|
|
|
1777
|
-
MS_DEBUG_DEV("received
|
|
1780
|
+
MS_DEBUG_DEV("received COOKIE-ECHO indicating a restarted peer");
|
|
1778
1781
|
|
|
1779
1782
|
this->tcb = nullptr;
|
|
1780
1783
|
this->associationListenerDeferrer.OnAssociationRestarted();
|
|
@@ -1786,9 +1789,9 @@ namespace RTC
|
|
|
1786
1789
|
receivedPacket->GetVerificationTag() == this->tcb->GetLocalVerificationTag() &&
|
|
1787
1790
|
cookie->GetRemoteVerificationTag() != this->tcb->GetRemoteVerificationTag())
|
|
1788
1791
|
{
|
|
1789
|
-
// TODO: dcsctp: Handle the case in which remote
|
|
1792
|
+
// TODO: dcsctp: Handle the case in which remote verification tag is 0?
|
|
1790
1793
|
|
|
1791
|
-
MS_DEBUG_DEV("received
|
|
1794
|
+
MS_DEBUG_DEV("received COOKIE-ECHO indicating simultaneous associations");
|
|
1792
1795
|
|
|
1793
1796
|
this->tcb = nullptr;
|
|
1794
1797
|
}
|
|
@@ -1802,7 +1805,7 @@ namespace RTC
|
|
|
1802
1805
|
cookie->GetRemoteVerificationTag() == this->tcb->GetRemoteVerificationTag() &&
|
|
1803
1806
|
cookie->GetTieTag() == this->tcb->GetTieTag())
|
|
1804
1807
|
{
|
|
1805
|
-
MS_DEBUG_DEV("received
|
|
1808
|
+
MS_DEBUG_DEV("received COOKIE-ECHO indicating a late COOKIE-ECHO, discarding");
|
|
1806
1809
|
|
|
1807
1810
|
return false;
|
|
1808
1811
|
}
|
|
@@ -1814,7 +1817,7 @@ namespace RTC
|
|
|
1814
1817
|
cookie->GetRemoteVerificationTag() == this->tcb->GetRemoteVerificationTag())
|
|
1815
1818
|
{
|
|
1816
1819
|
MS_DEBUG_DEV(
|
|
1817
|
-
"received duplicate
|
|
1820
|
+
"received duplicate COOKIE-ECHO, probably because of peer not receiving COOKIE-ACK and retransmitting COOKIE-ECHO");
|
|
1818
1821
|
}
|
|
1819
1822
|
|
|
1820
1823
|
return true;
|
|
@@ -1831,7 +1834,7 @@ namespace RTC
|
|
|
1831
1834
|
// discard a received COOKIE ACK chunk."
|
|
1832
1835
|
if (this->state != State::COOKIE_ECHOED)
|
|
1833
1836
|
{
|
|
1834
|
-
MS_DEBUG_DEV("received
|
|
1837
|
+
MS_DEBUG_DEV("received COOKIE-ACK not in COOKIE_ECHOED state, discarding");
|
|
1835
1838
|
|
|
1836
1839
|
return;
|
|
1837
1840
|
}
|
|
@@ -1841,7 +1844,7 @@ namespace RTC
|
|
|
1841
1844
|
this->t1CookieTimer->Stop();
|
|
1842
1845
|
this->tcb->ClearRemoteStateCookie();
|
|
1843
1846
|
|
|
1844
|
-
SetState(State::ESTABLISHED, "
|
|
1847
|
+
SetState(State::ESTABLISHED, "COOKIE-ACK received");
|
|
1845
1848
|
|
|
1846
1849
|
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
1847
1850
|
|
|
@@ -1910,7 +1913,7 @@ namespace RTC
|
|
|
1910
1913
|
// SHUTDOWN chunk sender."
|
|
1911
1914
|
default:
|
|
1912
1915
|
{
|
|
1913
|
-
MS_DEBUG_DEV("received SHUTDOWN, shutting down the
|
|
1916
|
+
MS_DEBUG_DEV("received SHUTDOWN, shutting down the association");
|
|
1914
1917
|
|
|
1915
1918
|
SetState(State::SHUTDOWN_RECEIVED, "SHUTDOWN received");
|
|
1916
1919
|
MaySendShutdownOrShutdownAckChunk();
|
|
@@ -1937,8 +1940,8 @@ namespace RTC
|
|
|
1937
1940
|
auto packet = this->tcb->CreatePacket();
|
|
1938
1941
|
const auto* shutdownCompleteChunk = packet->BuildChunkInPlace<ShutdownCompleteChunk>();
|
|
1939
1942
|
|
|
1940
|
-
// NOTE: Don't set bit T in the
|
|
1941
|
-
// knows the
|
|
1943
|
+
// NOTE: Don't set bit T in the SHUTDOWN-COMPLETE chunk since TCB
|
|
1944
|
+
// knows the verification tag expected by the remote.
|
|
1942
1945
|
|
|
1943
1946
|
shutdownCompleteChunk->Consolidate();
|
|
1944
1947
|
|
|
@@ -2024,13 +2027,13 @@ namespace RTC
|
|
|
2024
2027
|
{
|
|
2025
2028
|
MS_DEBUG_TAG(
|
|
2026
2029
|
sctp,
|
|
2027
|
-
"received
|
|
2030
|
+
"received OPERATION-ERROR chunk on a association with no TCB, ignoring: %s",
|
|
2028
2031
|
errorCausesStr.c_str());
|
|
2029
2032
|
|
|
2030
2033
|
return;
|
|
2031
2034
|
}
|
|
2032
2035
|
|
|
2033
|
-
MS_WARN_TAG(sctp, "received
|
|
2036
|
+
MS_WARN_TAG(sctp, "received OPERATION-ERROR chunk: %s", errorCausesStr.c_str());
|
|
2034
2037
|
|
|
2035
2038
|
this->associationListenerDeferrer.OnAssociationError(
|
|
2036
2039
|
Types::ErrorKind::PEER_REPORTED, errorCausesStr);
|
|
@@ -2063,13 +2066,13 @@ namespace RTC
|
|
|
2063
2066
|
{
|
|
2064
2067
|
MS_DEBUG_TAG(
|
|
2065
2068
|
sctp,
|
|
2066
|
-
"received ABORT
|
|
2069
|
+
"received ABORT chunk on a association with no TCB, ignoring: %s",
|
|
2067
2070
|
errorCausesStr.c_str());
|
|
2068
2071
|
|
|
2069
2072
|
return;
|
|
2070
2073
|
}
|
|
2071
2074
|
|
|
2072
|
-
MS_WARN_TAG(sctp, "received ABORT
|
|
2075
|
+
MS_WARN_TAG(sctp, "received ABORT chunk, closing association: %s", errorCausesStr.c_str());
|
|
2073
2076
|
|
|
2074
2077
|
InternalClose(Types::ErrorKind::PEER_REPORTED, errorCausesStr);
|
|
2075
2078
|
}
|
|
@@ -2120,7 +2123,7 @@ namespace RTC
|
|
|
2120
2123
|
MaySendResetStreamsRequest();
|
|
2121
2124
|
|
|
2122
2125
|
// If a response was processed, pending to-be-reset streams may now have
|
|
2123
|
-
// become unpaused. Try to send more DATA/
|
|
2126
|
+
// become unpaused. Try to send more DATA/I-DATA chunks.
|
|
2124
2127
|
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
2125
2128
|
|
|
2126
2129
|
this->tcb->SendBufferedPackets(nowMs);
|
|
@@ -2162,7 +2165,7 @@ namespace RTC
|
|
|
2162
2165
|
auto* abortAssociationChunk = packet->BuildChunkInPlace<AbortAssociationChunk>();
|
|
2163
2166
|
|
|
2164
2167
|
// NOTE: Don't set bit T in the ABORT chunk since TCB knows the
|
|
2165
|
-
//
|
|
2168
|
+
// verification tag expected by the remote.
|
|
2166
2169
|
|
|
2167
2170
|
auto* protocolViolationErrorCause =
|
|
2168
2171
|
abortAssociationChunk->BuildErrorCauseInPlace<ProtocolViolationErrorCause>();
|
|
@@ -2263,7 +2266,7 @@ namespace RTC
|
|
|
2263
2266
|
// If the reassembly queue is full and there's no messages waiting,
|
|
2264
2267
|
// there is nothing that can be done. The specification only allows
|
|
2265
2268
|
// dropping gap-ack-blocks, and that's not likely to help as the
|
|
2266
|
-
//
|
|
2269
|
+
// association has been trying to fill gaps since the watermark was
|
|
2267
2270
|
// reached.
|
|
2268
2271
|
else
|
|
2269
2272
|
{
|
|
@@ -2271,7 +2274,7 @@ namespace RTC
|
|
|
2271
2274
|
auto* abortAssociationChunk = packet->BuildChunkInPlace<AbortAssociationChunk>();
|
|
2272
2275
|
|
|
2273
2276
|
// NOTE: Don't set bit T in the ABORT chunk since TCB knows the
|
|
2274
|
-
//
|
|
2277
|
+
// verification tag expected by the remote.
|
|
2275
2278
|
|
|
2276
2279
|
auto* outOfResourceErrorCause =
|
|
2277
2280
|
abortAssociationChunk->BuildErrorCauseInPlace<OutOfResourceErrorCause>();
|
|
@@ -2338,7 +2341,7 @@ namespace RTC
|
|
|
2338
2341
|
{
|
|
2339
2342
|
MaySendShutdownOrShutdownAckChunk();
|
|
2340
2343
|
|
|
2341
|
-
// Receiving an ACK may make the
|
|
2344
|
+
// Receiving an ACK may make the association go into fast recovery mode.
|
|
2342
2345
|
//
|
|
2343
2346
|
// https://datatracker.ietf.org/doc/html/rfc9260#section-7.2.4
|
|
2344
2347
|
//
|
|
@@ -2379,15 +2382,15 @@ namespace RTC
|
|
|
2379
2382
|
{
|
|
2380
2383
|
MS_WARN_TAG(
|
|
2381
2384
|
sctp,
|
|
2382
|
-
"
|
|
2383
|
-
" received, skipping further processing of
|
|
2385
|
+
"chunk with unknown type %" PRIu8
|
|
2386
|
+
" received, skipping further processing of chunks in the packet",
|
|
2384
2387
|
static_cast<uint8_t>(receivedUnknownChunk->GetType()));
|
|
2385
2388
|
}
|
|
2386
2389
|
else
|
|
2387
2390
|
{
|
|
2388
2391
|
MS_DEBUG_TAG(
|
|
2389
2392
|
sctp,
|
|
2390
|
-
"ignoring received
|
|
2393
|
+
"ignoring received chunk with unknown type %" PRIu8,
|
|
2391
2394
|
static_cast<uint8_t>(receivedUnknownChunk->GetType()));
|
|
2392
2395
|
}
|
|
2393
2396
|
|
|
@@ -2397,7 +2400,7 @@ namespace RTC
|
|
|
2397
2400
|
Types::ErrorKind::PARSE_FAILED, "unknown chunk with type indicating it should be reported");
|
|
2398
2401
|
|
|
2399
2402
|
// If there is TCB (we need correct remote verification tag) send an
|
|
2400
|
-
//
|
|
2403
|
+
// OPERATION-ERROR chunk with a Unrecognized Chunk type error cause.
|
|
2401
2404
|
if (this->tcb)
|
|
2402
2405
|
{
|
|
2403
2406
|
auto packet = this->tcb->CreatePacket();
|
|
@@ -2432,7 +2435,7 @@ namespace RTC
|
|
|
2432
2435
|
}
|
|
2433
2436
|
else
|
|
2434
2437
|
{
|
|
2435
|
-
InternalClose(Types::ErrorKind::TOO_MANY_RETRIES, "no
|
|
2438
|
+
InternalClose(Types::ErrorKind::TOO_MANY_RETRIES, "no INIT-ACK chunk received");
|
|
2436
2439
|
}
|
|
2437
2440
|
|
|
2438
2441
|
AssertIsConsistent();
|
|
@@ -2454,7 +2457,7 @@ namespace RTC
|
|
|
2454
2457
|
}
|
|
2455
2458
|
else
|
|
2456
2459
|
{
|
|
2457
|
-
InternalClose(Types::ErrorKind::TOO_MANY_RETRIES, "no
|
|
2460
|
+
InternalClose(Types::ErrorKind::TOO_MANY_RETRIES, "no COOKIE-ACK chunk received");
|
|
2458
2461
|
}
|
|
2459
2462
|
|
|
2460
2463
|
AssertIsConsistent();
|
|
@@ -2482,7 +2485,7 @@ namespace RTC
|
|
|
2482
2485
|
auto* abortAssociationChunk = packet->BuildChunkInPlace<AbortAssociationChunk>();
|
|
2483
2486
|
|
|
2484
2487
|
// NOTE: Don't set bit T in the ABORT chunk since TCB knows the
|
|
2485
|
-
//
|
|
2488
|
+
// verification tag expected by the remote.
|
|
2486
2489
|
|
|
2487
2490
|
auto* userInitiatedAbortErrorCause =
|
|
2488
2491
|
abortAssociationChunk->BuildErrorCauseInPlace<UserInitiatedAbortErrorCause>();
|
|
@@ -2495,7 +2498,7 @@ namespace RTC
|
|
|
2495
2498
|
|
|
2496
2499
|
this->packetSender.SendPacket(packet.get());
|
|
2497
2500
|
|
|
2498
|
-
InternalClose(Types::ErrorKind::TOO_MANY_RETRIES, "no
|
|
2501
|
+
InternalClose(Types::ErrorKind::TOO_MANY_RETRIES, "no SHUTDOWN-ACK chunk received");
|
|
2499
2502
|
|
|
2500
2503
|
AssertIsConsistent();
|
|
2501
2504
|
|
|
@@ -2640,7 +2643,7 @@ namespace RTC
|
|
|
2640
2643
|
!this->t1InitTimer->IsRunning(), "internal state is NEW but T1 Init timer is running");
|
|
2641
2644
|
MS_ASSERT(
|
|
2642
2645
|
!this->t1CookieTimer->IsRunning(),
|
|
2643
|
-
"internal state is NEW but T1
|
|
2646
|
+
"internal state is NEW but T1 cookie timer is running");
|
|
2644
2647
|
MS_ASSERT(
|
|
2645
2648
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2646
2649
|
"internal state is NEW but T2 Shutdown timer is running");
|
|
@@ -2655,7 +2658,7 @@ namespace RTC
|
|
|
2655
2658
|
!this->t1InitTimer->IsRunning(), "internal state is CLOSED but T1 Init timer is running");
|
|
2656
2659
|
MS_ASSERT(
|
|
2657
2660
|
!this->t1CookieTimer->IsRunning(),
|
|
2658
|
-
"internal state is CLOSED but T1
|
|
2661
|
+
"internal state is CLOSED but T1 cookie timer is running");
|
|
2659
2662
|
MS_ASSERT(
|
|
2660
2663
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2661
2664
|
"internal state is CLOSED but T2 Shutdown timer is running");
|
|
@@ -2671,7 +2674,7 @@ namespace RTC
|
|
|
2671
2674
|
"internal state is COOKIE_WAIT but T1 Init timer is not running");
|
|
2672
2675
|
MS_ASSERT(
|
|
2673
2676
|
!this->t1CookieTimer->IsRunning(),
|
|
2674
|
-
"internal state is COOKIE_WAIT but T1
|
|
2677
|
+
"internal state is COOKIE_WAIT but T1 cookie timer is running");
|
|
2675
2678
|
MS_ASSERT(
|
|
2676
2679
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2677
2680
|
"internal state is COOKIE_WAIT but T2 Shutdown timer is running");
|
|
@@ -2687,7 +2690,7 @@ namespace RTC
|
|
|
2687
2690
|
"internal state is COOKIE_ECHOED but T1 Init timer is not running");
|
|
2688
2691
|
MS_ASSERT(
|
|
2689
2692
|
this->t1CookieTimer->IsRunning(),
|
|
2690
|
-
"internal state is COOKIE_ECHOED but T1
|
|
2693
|
+
"internal state is COOKIE_ECHOED but T1 cookie timer is not running");
|
|
2691
2694
|
MS_ASSERT(
|
|
2692
2695
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2693
2696
|
"internal state is COOKIE_ECHOED but T2 Shutdown timer is running");
|
|
@@ -2706,7 +2709,7 @@ namespace RTC
|
|
|
2706
2709
|
"internal state is ESTABLISHED but T1 Init timer is running");
|
|
2707
2710
|
MS_ASSERT(
|
|
2708
2711
|
!this->t1CookieTimer->IsRunning(),
|
|
2709
|
-
"internal state is ESTABLISHED but T1
|
|
2712
|
+
"internal state is ESTABLISHED but T1 cookie timer is running");
|
|
2710
2713
|
MS_ASSERT(
|
|
2711
2714
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2712
2715
|
"internal state is ESTABLISHED but T2 Shutdown timer is running");
|
|
@@ -2722,7 +2725,7 @@ namespace RTC
|
|
|
2722
2725
|
"internal state is SHUTDOWN_PENDING but T1 Init timer is running");
|
|
2723
2726
|
MS_ASSERT(
|
|
2724
2727
|
!this->t1CookieTimer->IsRunning(),
|
|
2725
|
-
"internal state is SHUTDOWN_PENDING but T1
|
|
2728
|
+
"internal state is SHUTDOWN_PENDING but T1 cookie timer is running");
|
|
2726
2729
|
MS_ASSERT(
|
|
2727
2730
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2728
2731
|
"internal state is SHUTDOWN_PENDING but T2 Shutdown timer is running");
|
|
@@ -2738,7 +2741,7 @@ namespace RTC
|
|
|
2738
2741
|
"internal state is SHUTDOWN_SENT but T1 Init timer is running");
|
|
2739
2742
|
MS_ASSERT(
|
|
2740
2743
|
!this->t1CookieTimer->IsRunning(),
|
|
2741
|
-
"internal state is SHUTDOWN_SENT but T1
|
|
2744
|
+
"internal state is SHUTDOWN_SENT but T1 cookie timer is running");
|
|
2742
2745
|
MS_ASSERT(
|
|
2743
2746
|
this->t2ShutdownTimer->IsRunning(),
|
|
2744
2747
|
"internal state is SHUTDOWN_SENT but T2 Shutdown timer is not running");
|
|
@@ -2754,7 +2757,7 @@ namespace RTC
|
|
|
2754
2757
|
"internal state is SHUTDOWN_RECEIVED but T1 Init timer is running");
|
|
2755
2758
|
MS_ASSERT(
|
|
2756
2759
|
!this->t1CookieTimer->IsRunning(),
|
|
2757
|
-
"internal state is SHUTDOWN_RECEIVED but T1
|
|
2760
|
+
"internal state is SHUTDOWN_RECEIVED but T1 cookie timer is running");
|
|
2758
2761
|
MS_ASSERT(
|
|
2759
2762
|
!this->t2ShutdownTimer->IsRunning(),
|
|
2760
2763
|
"internal state is SHUTDOWN_RECEIVED but T2 Shutdown timer is running");
|
|
@@ -2770,7 +2773,7 @@ namespace RTC
|
|
|
2770
2773
|
"internal state is SHUTDOWN_ACK_SENT but T1 Init timer is running");
|
|
2771
2774
|
MS_ASSERT(
|
|
2772
2775
|
!this->t1CookieTimer->IsRunning(),
|
|
2773
|
-
"internal state is SHUTDOWN_ACK_SENT but T1
|
|
2776
|
+
"internal state is SHUTDOWN_ACK_SENT but T1 cookie timer is running");
|
|
2774
2777
|
MS_ASSERT(
|
|
2775
2778
|
this->t2ShutdownTimer->IsRunning(),
|
|
2776
2779
|
"internal state is SHUTDOWN_ACK_SENT but T2 Shutdown timer is not running");
|