candidate: ensuring stun priority uniqueness no more needed
authorFabrice Bellet <fabrice@bellet.info>
Wed, 12 Feb 2020 14:48:12 +0000 (15:48 +0100)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Mon, 4 May 2020 20:39:11 +0000 (20:39 +0000)
commitf997215d0f6ec72e0402cbedfbfd00c21499ad4b
treeaddeee06af453c6a311d54f63cd36d92be0b3192
parentab14d9ed0fd7b279c54c47e649b6766557e55e44
candidate: ensuring stun priority uniqueness no more needed

The uniqueness of candidate priorities is achieved by the iteration on
the ip local addresses for local host candidates, and also on their base
address for reflexive and relay candidates. Helper function checking
its uniqueness at allocation time is not required anyore.

The priority of the stun request (prflx_priority) is built from the
priority of the local candidate of the pair, according the RFC 5245,
section 7.1.2.1. This priority must be identical to a virtual "local
candidate of type peer-reflexive that would be learned as a consequence
of a check from this local candidate."

Outgoing stun requests will come from local candidates of type host or
type relayed. The priority uniqueness of local candidates of type host
implies the uniqueness of the computed peer-reflexive priority.  And
relay local candidates cannot produce a peer-reflexive local candidate
by design, so we can safely use their unique local priority too in
the stun request.
agent/conncheck.c
agent/conncheck.h
agent/discovery.c