Skip to content
  • Fabrice Bellet's avatar
    conncheck: fix pair priorities uniqueness · 2118cbae
    Fabrice Bellet authored and Olivier Crête's avatar Olivier Crête committed
    This patch fixes the priority assigned to a peer reflexive discovered
    local candidate, when the agent has the stun client role and receives an
    stun reply. This priority must be the value put in the stun request, ie
    the pair->rflx_priority from the parent pair. This ensures two similar
    ordered pairs, will generate discovered pairs ordered in the same way
    for the stun client, and also for the stun server on the other side.
    Without this identical ordered on both sides of the connections, the two
    agents may nominate a different pair with the aggresive nomination
    scenario, since both are valid.
    
    The other fix concerns the function that ensures local candidates
    priority uniqueness, that breaks the assumption that "two local
    candidates having the same priority should generate the same
    prflx_priority in the pairs they contribute". Respecting this assumption
    is important to stay coherent with the behavior of the other agent, that
    considers that two stun requests coming from the same peer-reflexive
    remote candidate will have the same remote priority (once a remote
    candidate is added to the component remote_candidates list, its priority
    is not supposed to change).
    2118cbae