Commit 99d6f661 authored by Youness Alaoui's avatar Youness Alaoui Committed by Olivier Crête

Do not add server-reflexive from TURN if using a TCP connection

parent 72dda7df
......@@ -2484,6 +2484,11 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
/* We also received our mapped address */
nice_address_set_from_sockaddr (&niceaddr, &sockaddr.addr);
/* TCP or TLS TURNS means the server-reflexive address was
* on a TCP connection, which cannot be used for server-reflexive
* discovery of candidates.
*/
if (d->turn->type == NICE_RELAY_TYPE_TURN_UDP) {
discovery_add_server_reflexive_candidate (
d->agent,
d->stream->id,
......@@ -2493,6 +2498,7 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
d->nicesock,
FALSE);
}
}
nice_address_set_from_sockaddr (&niceaddr, &relayaddr.addr);
relay_cand = discovery_add_relay_candidate (
......
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