Changing MTU size for SCTP socket options.
With the latest usrsctp roll, the MTU value you provide is the space avaiable for chunks in the packet. We previously specified this to be the MTU for the entire SCTP packet, so we were logging errors when the SCTP packets were 12 bytes larger than expected (the size of the SCTP header). This fix updates our MTU specified to account for the SCTP header size as well. Bug: webrtc:9082 Change-Id: Id3bfa839d4e7662230111ebbdf33bd81ccdc7cf4 Reviewed-on: https://webrtc-review.googlesource.com/66943 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Seth Hampson <shampson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22754}
This commit is contained in:
parent
09a6cd5541
commit
5150ee40f4
@ -656,7 +656,9 @@ bool SctpTransport::Connect() {
|
||||
sctp_paddrparams params = {{0}};
|
||||
memcpy(¶ms.spp_address, &remote_sconn, sizeof(remote_sconn));
|
||||
params.spp_flags = SPP_PMTUD_DISABLE;
|
||||
params.spp_pathmtu = kSctpMtu;
|
||||
// The MTU value provided specifies the space available for chunks in the
|
||||
// packet, so we subtract the SCTP header size.
|
||||
params.spp_pathmtu = kSctpMtu - sizeof(struct sctp_common_header);
|
||||
if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, ¶ms,
|
||||
sizeof(params))) {
|
||||
RTC_LOG_ERRNO(LS_ERROR) << debug_name_ << "->Connect(): "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user