Resolves: #1541646 - component: accept TURN in nice_component_verify_remote_candidate()

This commit is contained in:
Kamil Dudka 2018-05-07 17:37:42 +02:00
parent 9cda080044
commit a04a646f78
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From e4d92bf96d0bb64df35790e5b49c58bfa6e9fbcc Mon Sep 17 00:00:00 2001
From: Jakub Adam <jakub.adam@ktknet.cz>
Date: Thu, 20 Apr 2017 06:47:00 +0200
Subject: [PATCH] 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().
Bug: 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 6eee90e..3e8a7a6 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)
--
2.14.3

View File

@ -22,6 +22,9 @@ Patch2: libnice-0.1.14-tests-i686.patch
# make tests pass in Koji
Patch3: libnice-0.1.14-tests-koji.patch
# component: accept TURN in nice_component_verify_remote_candidate() (#1541646)
Patch4: libnice-0.1.14-turn-verify.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: glib2-devel
@ -82,6 +85,7 @@ developing applications that use %{name}.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
chmod 0755 scripts/valgrind-test-driver
# disable test-new-dribble, which sometimes hangs indefinitely, and
@ -155,6 +159,7 @@ make check
%changelog
* Mon May 07 2018 Kamil Dudka <kdudka@redhat.com> - 0.1.14-7.20180504git34d6044
- component: accept TURN in nice_component_verify_remote_candidate() (#1541646)
- update to 0.1.14-85-g34d6044 (#1541646)
* Mon Apr 16 2018 Kamil Dudka <kdudka@redhat.com> - 0.1.14-6.20171128gitfb2f1f7