Blame SOURCES/libnice-0.1.14-turn-verify.patch

5f17a8
From e4d92bf96d0bb64df35790e5b49c58bfa6e9fbcc Mon Sep 17 00:00:00 2001
5f17a8
From: Jakub Adam <jakub.adam@ktknet.cz>
5f17a8
Date: Thu, 20 Apr 2017 06:47:00 +0200
5f17a8
Subject: [PATCH] component: accept TURN in
5f17a8
 nice_component_verify_remote_candidate()
5f17a8
5f17a8
When TURN is in operation, agent_recv_message_unlocked() may receive from
5f17a8
NiceSocket with type = NICE_SOCKET_TYPE_UDP_TURN. Such messages were always
5f17a8
dropped due to failed nice_component_verify_remote_candidate().
5f17a8
5f17a8
Bug: https://phabricator.freedesktop.org/D1727
5f17a8
---
5f17a8
 agent/component.c | 3 ++-
5f17a8
 1 file changed, 2 insertions(+), 1 deletion(-)
5f17a8
5f17a8
diff --git a/agent/component.c b/agent/component.c
5f17a8
index 6eee90e..3e8a7a6 100644
5f17a8
--- a/agent/component.c
5f17a8
+++ b/agent/component.c
5f17a8
@@ -1510,7 +1510,8 @@ nice_component_verify_remote_candidate (NiceComponent *component,
5f17a8
                 (cand->transport == NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE ||
5f17a8
                     cand->transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE ||
5f17a8
                     cand->transport == NICE_CANDIDATE_TRANSPORT_TCP_SO)) ||
5f17a8
-            cand->transport == NICE_CANDIDATE_TRANSPORT_UDP) &&
5f17a8
+            cand->transport == NICE_CANDIDATE_TRANSPORT_UDP ||
5f17a8
+            nicesock->type == NICE_SOCKET_TYPE_UDP_TURN) &&
5f17a8
         nice_address_equal (address, &cand->addr)) {
5f17a8
       /* fast return if it's already the first */
5f17a8
       if (item == component->valid_candidates)
5f17a8
-- 
5f17a8
2.14.3
5f17a8