Commit ef6293b4 authored by Olivier Crête's avatar Olivier Crête

conncheck: Drop valid STUN for which we can't find a request

It's most likely caused by a retransmission received after the initial
request already had a reply.
parent a5b9d30d
......@@ -4584,6 +4584,14 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, NiceStream *stream,
return TRUE;
}
/* This is most likely caused by a second response to a request which
* already has received a valid reply.
*/
if (valid == STUN_VALIDATION_UNMATCHED_RESPONSE) {
nice_debug ("Agent %p : Valid STUN response for which we don't have a request, ignoring", agent);
return TRUE;
}
if (valid != STUN_VALIDATION_SUCCESS) {
nice_debug ("Agent %p : STUN message is unsuccessful %d, ignoring", agent, valid);
return FALSE;
......
......@@ -96,7 +96,7 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id,
* Assert on any unreleated packet received. This would include anything
* send before the negotiation is over.
*/
g_assert (len == 16);
g_assert_cmpuint (len, ==, 16);
g_assert (strncmp ("1234567812345678", buf, 16) == 0);
if (component_id == 2)
......
......@@ -160,7 +160,7 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id,
if (count_val == 10)
return;
g_assert (len == 10);
g_assert_cmpuint (len, ==, 10);
memset (data, count_val + '1', 10);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment