Commit c0bd3209 authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

conncheck: inbound stun on tcp passive pairs should trigger a check

An inbound stun request on a newly discovered pair should trigger a
conncheck in the reverse direction, and not promote the pair directly in
state succeeded. This is particulary required if the agent is in
aggressive controlling mode.
parent a2fb11fc
...@@ -2086,12 +2086,9 @@ conn_check_remote_candidates_set(NiceAgent *agent, NiceStream *stream, ...@@ -2086,12 +2086,9 @@ conn_check_remote_candidates_set(NiceAgent *agent, NiceStream *stream,
break; break;
} }
} }
if (pair == NULL) { if (pair == NULL)
pair = priv_conn_check_add_for_candidate_pair_matched (agent, priv_conn_check_add_for_candidate_pair_matched (agent,
stream->id, component, lcand, rcand, NICE_CHECK_SUCCEEDED); stream->id, component, lcand, rcand, NICE_CHECK_WAITING);
if (pair)
pair->valid = TRUE;
}
} }
priv_schedule_triggered_check (agent, stream, component, priv_schedule_triggered_check (agent, stream, component,
...@@ -4837,16 +4834,11 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, NiceStream *stream, ...@@ -4837,16 +4834,11 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, NiceStream *stream,
remote_candidate2 ? remote_candidate2 : remote_candidate); remote_candidate2 ? remote_candidate2 : remote_candidate);
if(remote_candidate && stream->remote_ufrag[0]) { if(remote_candidate && stream->remote_ufrag[0]) {
if (local_candidate && if (local_candidate &&
local_candidate->transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE) { local_candidate->transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE)
CandidateCheckPair *pair; priv_conn_check_add_for_candidate_pair_matched (agent,
pair = priv_conn_check_add_for_candidate_pair_matched (agent,
stream->id, component, local_candidate, remote_candidate, stream->id, component, local_candidate, remote_candidate,
NICE_CHECK_SUCCEEDED); NICE_CHECK_WAITING);
if (pair) { else
pair->valid = TRUE;
}
} else
conn_check_add_for_candidate (agent, stream->id, component, remote_candidate); conn_check_add_for_candidate (agent, stream->id, component, remote_candidate);
} }
} }
......
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