summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Adam <jakub.adam@ktknet.cz>2017-04-19 20:42:03 +0200
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2018-06-21 19:20:00 +0000
commit495987991b104f33067cff651321ff4ff1cfa92a (patch)
tree828a883424290c5b7cfcfc793cc3639f8400dd25
parent090d3dba7abdb1a997b0126b59846dba69a4b975 (diff)
downloadlibnice-wip/accept-turn-in-verify-remote-cand.tar.gz
component: accept TURN in nice_component_verify_remote_candidate()wip/accept-turn-in-verify-remote-cand
When TURN is in operation, agent_recv_message_unlocked() may receive from NiceSocket with type = NICE_SOCKET_TYPE_UDP_TURN. Such messages were always dropped due to failed nice_component_verify_remote_candidate(). Differential Revision: https://phabricator.freedesktop.org/D1727
-rw-r--r--agent/component.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/agent/component.c b/agent/component.c
index 3794c3d..98e612c 100644
--- a/agent/component.c
+++ b/agent/component.c
@@ -1510,7 +1510,8 @@ nice_component_verify_remote_candidate (NiceComponent *component,
(cand->transport == NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE ||
cand->transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE ||
cand->transport == NICE_CANDIDATE_TRANSPORT_TCP_SO)) ||
- cand->transport == NICE_CANDIDATE_TRANSPORT_UDP) &&
+ cand->transport == NICE_CANDIDATE_TRANSPORT_UDP ||
+ nicesock->type == NICE_SOCKET_TYPE_UDP_TURN) &&
nice_address_equal (address, &cand->addr)) {
/* fast return if it's already the first */
if (item == component->valid_candidates)