Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: webrtc/media/sctp/sctptransport.cc

Issue 2743653005: Fixed invalid filtering of SCTP datachannel packets on high ports. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/media/sctp/sctptransport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/sctp/sctptransport.cc
diff --git a/webrtc/media/sctp/sctptransport.cc b/webrtc/media/sctp/sctptransport.cc
index ae69628a98b8a0031f1fe0d57ac5b5b92bf42bdf..45e8decb387f2798f51dec94f971875868f085ed 100644
--- a/webrtc/media/sctp/sctptransport.cc
+++ b/webrtc/media/sctp/sctptransport.cc
@@ -37,7 +37,6 @@ enum PreservedErrno {
#include "webrtc/base/trace_event.h"
#include "webrtc/media/base/codec.h"
#include "webrtc/media/base/mediaconstants.h"
-#include "webrtc/media/base/rtputils.h" // For IsRtpPacket
#include "webrtc/media/base/streamparams.h"
#include "webrtc/p2p/base/dtlstransportinternal.h" // For PF_NORMAL
@@ -828,9 +827,8 @@ void SctpTransport::OnPacketRead(rtc::PacketTransportInternal* transport,
RTC_DCHECK_EQ(transport_channel_, transport);
TRACE_EVENT0("webrtc", "SctpTransport::OnPacketRead");
- // TODO(pthatcher): Do this in a more robust way by checking for
- // SCTP or DTLS.
- if (IsRtpPacket(data, len)) {
+ if (flags & PF_SRTP_BYPASS) {
+ // We are only interested in SCTP packets.
return;
}
« no previous file with comments | « no previous file | webrtc/media/sctp/sctptransport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698