From 495987991b104f33067cff651321ff4ff1cfa92a Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Wed, 19 Apr 2017 20:42:03 +0200 Subject: component: accept TURN in nice_component_verify_remote_candidate() 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 --- agent/component.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1