Commit 502ddb83 authored by Jakub Adam's avatar Jakub Adam

conncheck: Connection check reply must have a remote candidate

Ensure that a conncheck reply is coming from an address and port of a
known remote candidate and that the type of incoming socket matches that
candidate's transport.

Attemps to fix a Coverity issue in which no matching remote_candidate
gets found for a connectivity reply in conn_check_handle_inbound_stun()
(apparently due to transport mismatch), yet
priv_map_reply_to_conn_check_request() still successfully matches it
with a previous request.
parent 7af761f3
Pipeline #109134 passed with stages
in 8 minutes and 50 seconds
......@@ -3560,6 +3560,15 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, NiceStre
return TRUE;
}
if (remote_candidate == NULL) {
candidate_check_pair_fail (stream, agent, p);
if (nice_debug_is_enabled ()) {
nice_debug ("Agent %p : pair %p FAILED "
"(got a matching pair without a known remote candidate).", agent, p);
}
return TRUE;
}
/* note: CONNECTED but not yet READY, see docs */
/* step: handle the possible case of a peer-reflexive
......
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