From: Fabrice Bellet Date: Wed, 12 Jun 2019 19:44:48 +0000 (+0200) Subject: conncheck: test incoming checks on candidate base address X-Git-Tag: 0.1.17~177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6a19418272cbd13e33a0a4f2668fe020f90242a;p=platform%2Fupstream%2Flibnice.git conncheck: test incoming checks on candidate base address The candidate may be a newly discovered peer reflexive one, or a server reflexive initial candidate, where address and base address differ. Early incoming checks are received on the base address. These incoming checks may accumulate if remote credentials arrive with a delay. --- diff --git a/agent/conncheck.c b/agent/conncheck.c index 97019d5..068705d 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -1727,8 +1727,14 @@ conn_check_remote_candidates_set(NiceAgent *agent, NiceStream *stream, if (nice_address_equal (&rcand->addr, &icheck->from)) { for (m = component->local_candidates; m; m = m->next) { NiceCandidate *cand = m->data; + NiceAddress *addr; - if (nice_address_equal (&cand->addr, &icheck->local_socket->addr)) { + if (cand->type == NICE_CANDIDATE_TYPE_RELAYED) + addr = &cand->addr; + else + addr = &cand->base_addr; + + if (nice_address_equal (addr, &icheck->local_socket->addr)) { lcand = cand; break; }