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

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