TurnPort should ignore STUN binding reponses when using shared socket.

BUG=4043
R=juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/27289004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7792 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
jiayl@webrtc.org 2014-12-03 02:17:07 +00:00
parent 001f3b9818
commit 511f8a8ef2

View File

@ -459,6 +459,14 @@ void TurnPort::OnReadPacket(
} else if (msg_type == TURN_DATA_INDICATION) {
HandleDataIndication(data, size, packet_time);
} else {
if (SharedSocket() &&
(msg_type == STUN_BINDING_RESPONSE ||
msg_type == STUN_BINDING_ERROR_RESPONSE)) {
LOG_J(LS_VERBOSE, this) <<
"Ignoring STUN binding response message on shared socket.";
return;
}
// This must be a response for one of our requests.
// Check success responses, but not errors, for MESSAGE-INTEGRITY.
if (IsStunSuccessResponseType(msg_type) &&