• Fabrice Bellet's avatar
    conncheck: improve the selection of the pairs to be checked · 15c0546f
    Fabrice Bellet authored
    This patch aims to implement more closely the algorithm described
    in RFC 5245 indicating how pairs are transitionned from state Frozen
    to Waiting. This is described in 7.1.3.2 when a check succeeded, and
    correspond to modifications in function priv_conn_check_unfreeze_related().
    This is also described in 5.7.4 when defining the initial state of the
    pairs in a conncheck, and correspond to modifications in function
    priv_conn_check_unfreeze_next().
    
    This patch introduces the notion of active and frozen check list. It
    allows us to define the timer restranmission delay as described in 16.1.
    
    Another modification in priv_conn_check_tick_unlocked() is that every
    stream in handled consecutively, and in an independant way. The pacing
    was previously of a single STUN request emitted per callback, it is now
    of a triggered check per callback OR a single STUN per callback AND per
    stream per callback.
    
    The description of ordinary checks per stream in 5.8 is detailled in
    function priv_conn_check_tick_stream(), and a remaining of the code
    used to nominate a pair by the controlling agent is put in a dedicated
    function priv_conn_check_tick_stream_nominate()
    
    Differential Revision: https://phabricator.freedesktop.org/D813
    15c0546f