Skip to content
  • Fabrice Bellet's avatar
    conncheck: update the state of triggered checks pairs · 6fe64fdb
    Fabrice Bellet authored and Olivier Crête's avatar Olivier Crête committed
    With this patch, we fix an ambiguity of some parts of the spec, when
    the document refers to in-progress pairs, that also concern pairs in
    the triggered checks list.
    
    The first cast is in section 7.1.2.5, "Updating the Nominated Flag",
    when the in-progress pair will be nominated on response arrival. This is
    handled in function priv_mark_pair_nominated(), when a pair is put to
    the triggered check list in reaction to a matching inbound stun request.
    Such a pair in priv_mark_pair_nominated() will _always_ be in the
    triggered check list, from the previously called function
    priv_schedule_triggered_check().
    
    The second case is in section 8.1.2, "Updating State" when an in-progress
    pair stops its retransmission when another pair of higher priority is
    already nominated. This is handled by function priv_prune_pending_checks().
    
    Until now, pairs enqueued in the triggered check list move transiently
    to state waiting, according to 7.2.1.4. But this state causes wrong
    decisions in the two previous cases, because such pairs should in fact
    rather be considered "like in-progress", to avoid discarding them
    inadvertantly.
    
    This patch update the state of the triggered check list
    pairs to in-progress. It allows to remove exception handling cited
    above: the code is a bit more simple, and allows some refactoring
    in priv_mark_pair_nominated() between RFC and compatibility modes.
    
    Differential Revision: https://phabricator.freedesktop.org/D1762
    6fe64fdb