diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2019-06-25 09:19:05 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2019-07-04 17:03:43 -0400 |
commit | 2118cbae32a3bdd6a03c692d5188437b4e53890e (patch) | |
tree | 40fe7be37ed987ac4bda8541a125f561a32dfe89 /agent/discovery.h | |
parent | 628fc393e36317ea6be417a475cc891e1c12c99c (diff) | |
download | libnice-2118cbae32a3bdd6a03c692d5188437b4e53890e.tar.gz |
conncheck: fix pair priorities uniqueness
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).
Diffstat (limited to 'agent/discovery.h')
-rw-r--r-- | agent/discovery.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/agent/discovery.h b/agent/discovery.h index 976118b..270c883 100644 --- a/agent/discovery.h +++ b/agent/discovery.h @@ -148,6 +148,7 @@ discovery_add_peer_reflexive_candidate ( NiceAgent *agent, guint stream_id, guint component_id, + guint32 priority, NiceAddress *address, NiceSocket *base_socket, NiceCandidate *local, |