summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/net/dcsctp/public
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/net/dcsctp/public
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/net/dcsctp/public')
-rw-r--r--third_party/libwebrtc/net/dcsctp/public/dcsctp_options.h15
-rw-r--r--third_party/libwebrtc/net/dcsctp/public/types.h21
2 files changed, 28 insertions, 8 deletions
diff --git a/third_party/libwebrtc/net/dcsctp/public/dcsctp_options.h b/third_party/libwebrtc/net/dcsctp/public/dcsctp_options.h
index d19798054c..600e8a362e 100644
--- a/third_party/libwebrtc/net/dcsctp/public/dcsctp_options.h
+++ b/third_party/libwebrtc/net/dcsctp/public/dcsctp_options.h
@@ -196,14 +196,13 @@ struct DcSctpOptions {
// Disables SCTP packet crc32 verification. For fuzzers only!
bool disable_checksum_verification = false;
- // Controls the acceptance of zero checksum, as defined in
- // https://datatracker.ietf.org/doc/draft-tuexen-tsvwg-sctp-zero-checksum/
- // This should only be enabled if the packet integrity can be ensured by lower
- // layers, which DTLS will do in WebRTC, as defined by RFC8261.
- //
- // This will also enable sending packets without a checksum value (set to 0)
- // once both peers have negotiated this feature.
- bool enable_zero_checksum = false;
+ // Controls the "zero checksum option" feature, as defined in
+ // https://www.ietf.org/archive/id/draft-ietf-tsvwg-sctp-zero-checksum-06.html.
+ // To have this feature enabled, both peers must be configured to use the
+ // same (defined, not "none") alternate error detection method.
+ ZeroChecksumAlternateErrorDetectionMethod
+ zero_checksum_alternate_error_detection_method =
+ ZeroChecksumAlternateErrorDetectionMethod::None();
};
} // namespace dcsctp
diff --git a/third_party/libwebrtc/net/dcsctp/public/types.h b/third_party/libwebrtc/net/dcsctp/public/types.h
index 02e2ce1e5e..1565cd7b58 100644
--- a/third_party/libwebrtc/net/dcsctp/public/types.h
+++ b/third_party/libwebrtc/net/dcsctp/public/types.h
@@ -151,6 +151,27 @@ class LifecycleId : public webrtc::StrongAlias<class LifecycleIdTag, uint64_t> {
static constexpr LifecycleId NotSet() { return LifecycleId(0); }
};
+
+// To enable zero checksum feature, both peers must agree on which alternate
+// error detection method that is used. See
+// https://www.ietf.org/archive/id/draft-ietf-tsvwg-sctp-zero-checksum-06.html.
+class ZeroChecksumAlternateErrorDetectionMethod
+ : public webrtc::StrongAlias<
+ class ZeroChecksumAlternateErrorDetectionMethodTag,
+ uint32_t> {
+ public:
+ constexpr explicit ZeroChecksumAlternateErrorDetectionMethod(
+ const UnderlyingType& v)
+ : webrtc::StrongAlias<class ZeroChecksumAlternateErrorDetectionMethodTag,
+ uint32_t>(v) {}
+
+ static constexpr ZeroChecksumAlternateErrorDetectionMethod None() {
+ return ZeroChecksumAlternateErrorDetectionMethod(0);
+ }
+ static constexpr ZeroChecksumAlternateErrorDetectionMethod LowerLayerDtls() {
+ return ZeroChecksumAlternateErrorDetectionMethod(1);
+ }
+};
} // namespace dcsctp
#endif // NET_DCSCTP_PUBLIC_TYPES_H_