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