diff options
author | Youness Alaoui <kakaroto@kakaroto.homelinux.net> | 2014-09-18 19:30:08 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-10-09 18:24:54 -0400 |
commit | 4e24bdd2f9d6a186a5a7c895c40cf69a0007c780 (patch) | |
tree | fc9c361ac9ed315755073846407e90c9d661f7a5 | |
parent | f8ee0621b5a895bcf030ed7f3388a26935038cfb (diff) | |
download | libnice-4e24bdd2f9d6a186a5a7c895c40cf69a0007c780.tar.gz |
agent: ignore externally set peer-reflexive candidates
All discovered peer-reflexive candidates should be added internally in
conncheck.c and should have the sockptr set. We ignore any prflx
candidates added by an external application because their NULL sockptr
could cause a crash in conn_check_send().
-rw-r--r-- | agent/agent.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c index 79651ba..a2fd46d 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -3054,6 +3054,10 @@ static gboolean priv_add_remote_candidate ( else { /* case 2: add a new candidate */ + if (type == NICE_CANDIDATE_TYPE_PEER_REFLEXIVE) { + nice_debug("Agent %p : Warning: ignoring externally set peer-reflexive candidate!", agent); + return FALSE; + } candidate = nice_candidate_new (type); component->remote_candidates = g_slist_append (component->remote_candidates, candidate); |