Skip to content

Commit

Permalink
(Auto)update libjingle 72659510-> 72673987
Browse files Browse the repository at this point in the history
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6829 4adac7df-926f-26a2-2b94-8c16560cd09d
  • Loading branch information
buildbot@webrtc.org committed Aug 5, 2014
1 parent e7d47a1 commit 624a504
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions talk/media/sctp/sctpdataengine.cc
Expand Up @@ -105,9 +105,9 @@ namespace cricket {
typedef rtc::ScopedMessageData<SctpInboundPacket> InboundPacketMessage;
typedef rtc::ScopedMessageData<rtc::Buffer> OutboundPacketMessage;

// TODO(ldixon): Find where this is defined, and also check is Sctp really
// respects this.
static const size_t kSctpMtu = 1280;
// The biggest SCTP packet. Starting from a 'safe' wire MTU value of 1280,
// take off 80 bytes for DTLS/TURN/TCP/IP overhead.
static const size_t kSctpMtu = 1200;

enum {
MSG_SCTPINBOUNDPACKET = 1, // MessageData is SctpInboundPacket
Expand Down Expand Up @@ -378,6 +378,18 @@ bool SctpDataMediaChannel::OpenSctpSocket() {
return false;
}

// Disable MTU discovery
struct sctp_paddrparams params;
params.spp_assoc_id = 0;
params.spp_flags = SPP_PMTUD_DISABLE;
params.spp_pathmtu = kSctpMtu;
if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &params,
sizeof(params))) {
LOG_ERRNO(LS_ERROR) << debug_name_
<< "Failed to set SCTP_PEER_ADDR_PARAMS.";
return false;
}

// Subscribe to SCTP event notifications.
int event_types[] = {SCTP_ASSOC_CHANGE,
SCTP_PEER_ADDR_CHANGE,
Expand Down

0 comments on commit 624a504

Please sign in to comment.