conncheck: match transport of peer-reflexive local candidates
authorFabrice Bellet <fabrice@bellet.info>
Mon, 17 Feb 2020 15:29:41 +0000 (16:29 +0100)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Mon, 2 Mar 2020 22:31:58 +0000 (22:31 +0000)
Another some rare case, but we may have two local candidates with
the same couple (address, port) and a different transport.

agent/conncheck.c

index 5d996a5..315a587 100644 (file)
@@ -3454,7 +3454,9 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
 
   for (j = component->local_candidates; j; j = j->next) {
     NiceCandidate *cand = j->data;
-    if (nice_address_equal (&mapped, &cand->addr)) {
+    if (nice_address_equal (&mapped, &cand->addr) &&
+      conn_check_match_transport (remote_candidate->transport) ==
+      cand->transport) {
       local_cand = cand;
 
       /* The mapped address allows to look for a previously discovered