Retransmit flag causes issue with early ichecks
@kakaroto
Submitted by Youness Alaoui Assigned to Fabrice Bellet @bellet
Description
filing this task at the suggestion of @ocrete from IRC.
The issue is with incoming early checks, it's explained in the commit log : https://github.com/tieto/libnice/commit/bb60ba90c3812c0f889dbc0e761414136b422fca
When we receive an early incoming check, we store it, then we trigger
it once we receive the remote candidates and credentials. But due to
the retransmit flag being unset in the CandidateCheckPair due to commit
36f306f4 which removed the retransmit init value to TRUE. This caused
the triggerred check to keep the pair in the IN_PROGRESS state without
trigerring the check. This causes a non-agressive nomination agent to
never establish connection because any early icheck derived pairs will
remain in-progress forever.
further info from the IRC log :
<ocrete>
check other places where the retransmit flag is set
<ocrete>
any reason not to use priv_add_stun_transaction() ?
<ocrete>
think yuou can submit it to the phab.fdo ? I'd like to get @bellet opinion.. he changed this code last
<ocrete>
and I'm a bit lost
<ocrete>
and he wrote the patch you're referencing to
<KaKaRoTo-KS>
ok, will do that
<ocrete>
I was always a bit lost of that part of the code
<KaKaRoTo-KS>
ocrete, I can't use add_stun_transaction because I'm not adding a transaction, I'm just triggering the check (when that gets triggered, it will then call conncheck_send which will do add_stun_transaction and create/send the stun)
<ocrete>
oh
<KaKaRoTo-KS>
the problem is that he's using the 'retransmit' to determine if a pair was nominated, because when he nominates a pair, he sets retransmit = FALSE on all pending pairs
<ocrete>
hmm
<KaKaRoTo-KS>
so when we just received the remote candidates and we check the early ichecks, they don't get trigerred because retransmit is set to FALSE, and it thinks "no need to trigger this in-progress pair, because we're already nominated" when in fact we're not
<ocrete>
hmm
<ocrete>
sounds reasonable... but I dont feel too confident about my understranding ;)