• V
    sctp: Fix error count increments that were results of HEARTBEATS · b9f84786
    Vlad Yasevich 提交于
    SCTP RFC 4960 states that unacknowledged HEARTBEATS count as
    errors agains a given transport or endpoint.  As such, we
    should increment the error counts for only for unacknowledged
    HB, otherwise we detect failure too soon.  This goes for both
    the overall error count and the path error count.
    
    Now, there is a difference in how the detection is done
    between the two.  The path error detection is done after
    the increment, so to detect it properly, we actually need
    to exceed the path threshold.  The overall error detection
    is done _BEFORE_ the increment.  Thus to detect the failure,
    it's enough for the error count to match the threshold.
    This is why all the state functions use '>=' to detect failure,
    while path detection uses '>'.
    
    Thanks goes to Chunbo Luo <chunbo.luo@windriver.com> who first
    proposed patches to fix this issue and made me re-read the spec
    and the code to figure out how this cruft really works.
    Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
    b9f84786
sm_sideeffect.c 45.6 KB