Commit 0f1e6c64 authored by Philip Withnall's avatar Philip Withnall

conncheck: fix keepalive stun agent initialisation

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: default avatarOlivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D804
parent 17488a20
...@@ -731,12 +731,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent) ...@@ -731,12 +731,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
nice_address_set_port (&stun_server, agent->stun_server_port); nice_address_set_port (&stun_server, agent->stun_server_port);
/* FIXME: This will cause the stun response to arrive on the socket nice_agent_init_stun_agent (agent, &stun_agent);
* 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);
buffer_len = stun_usage_bind_create (&stun_agent, buffer_len = stun_usage_bind_create (&stun_agent,
&stun_message, stun_buffer, sizeof(stun_buffer)); &stun_message, stun_buffer, sizeof(stun_buffer));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment