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

conncheck: do not create a pair from peer-reflexive local candidate

The usual case when forming the initial conncheck list from local and
remote candidates is to discard server-reflexive local candidates, since
the agent can not send requests directly from these candidates. But it
also may happen, when the remote candidates are received late after the
beginning of the conncheck, that we also have discovered peer-reflexive
local candidates, that must be discarded as well. See RFC 8445, section
6.1.2.4 "Pruning the Pairs".
parent 6afcb580
......@@ -2446,12 +2446,14 @@ gboolean conn_check_add_for_candidate_pair (NiceAgent *agent,
g_assert (local != NULL);
g_assert (remote != NULL);
/* note: do not create pairs where the local candidate is
* a srv-reflexive (ICE 5.7.3. "Pruning the pairs" ID-9) */
/* note: do not create pairs where the local candidate is a srv-reflexive
* or peer-reflexive (ICE 6.1.2.4. "Pruning the pairs" RFC 8445)
*/
if ((agent->compatibility == NICE_COMPATIBILITY_RFC5245 ||
agent->compatibility == NICE_COMPATIBILITY_WLM2009 ||
agent->compatibility == NICE_COMPATIBILITY_OC2007R2) &&
local->type == NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE) {
(local->type == NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE ||
local->type == NICE_CANDIDATE_TYPE_PEER_REFLEXIVE)) {
return FALSE;
}
......
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