diff --git a/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c b/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c index b2a1bb44eeb..2c31683f48e 100755 --- a/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c +++ b/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c @@ -1730,10 +1730,12 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, * don't double things */ net->hb_responded = 1; + struct timeval time_entered; net->RTO = sctp_calculate_rto(stcb, asoc, net, - &cookie->time_entered, + &time_entered, sctp_align_unsafe_makecopy, SCTP_RTT_FROM_NON_DATA); + cookie->time_entered = time_entered; if (stcb->asoc.sctp_autoclose_ticks && (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE))) { @@ -2482,9 +2484,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); if ((netp != NULL) && (*netp != NULL)) { /* calculate the RTT and set the encaps port */ + struct timeval time_entered; (*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp, - &cookie->time_entered, sctp_align_unsafe_makecopy, + &time_entered, sctp_align_unsafe_makecopy, SCTP_RTT_FROM_NON_DATA); + cookie->time_entered = time_entered; } /* respond with a COOKIE-ACK */ sctp_send_cookie_ack(stcb); diff --git a/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c b/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c index c0031672bf1..fa3d3891a84 100755 --- a/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c +++ b/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c @@ -6017,8 +6017,9 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, memset(&stc, 0, sizeof(struct sctp_state_cookie)); /* the time I built cookie */ - (void)SCTP_GETTIME_TIMEVAL(&stc.time_entered); - + struct timeval time_entered; + (void)SCTP_GETTIME_TIMEVAL(&time_entered); + stc.time_entered = time_entered; /* populate any tie tags */ if (asoc != NULL) { /* unlock before tag selections */ diff --git a/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c b/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c index 6f06d35df78..66c420e8f61 100755 --- a/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c +++ b/Source/ThirdParty/libwebrtc/Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c @@ -6813,7 +6813,6 @@ sctp_pcb_init() #endif #if defined(__Userspace__) mbuf_initialize(NULL); - atomic_init(); #if defined(INET) || defined(INET6) recv_thread_init(); #endif