From 0f1e6c64515871298b115b497b019506b8065235 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 1 Mar 2016 23:01:14 +0000 Subject: [PATCH] conncheck: fix keepalive stun agent initialisation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With this patch, we send keepalive binding requests using agent compatibility flags, instead of RFC 3489 classic stun. The peer stun agent will known how to handle it, and won't be confused by the uncompatible RFC 3489 message, causing "no cookie" errors in the debug log. Reviewed-by: Olivier Crête Differential Revision: https://phabricator.freedesktop.org/D804 --- agent/conncheck.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/agent/conncheck.c b/agent/conncheck.c index d704357..3adf2e3 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -731,12 +731,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent) nice_address_set_port (&stun_server, agent->stun_server_port); - /* FIXME: This will cause the stun response to arrive on the socket - * but the stun agent will not be able to parse it due to an invalid - * stun message since RFC3489 will not be compatible, and the response - * will be forwarded to the application as user data */ - stun_agent_init (&stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, - STUN_COMPATIBILITY_RFC3489, 0); + nice_agent_init_stun_agent (agent, &stun_agent); buffer_len = stun_usage_bind_create (&stun_agent, &stun_message, stun_buffer, sizeof(stun_buffer)); -- 2.7.4