• Gerrit Renker's avatar
    [DCCP] ccid3: Sanity-check RTT samples · de553c18
    Gerrit Renker authored
    CCID3 performance depends much on the accuracy of RTT samples.  If RTT
    samples grow too large, performance can be catastrophically poor.
    
    To limit the amount of possible damage in such cases, the patch
     * introduces an upper limit which identifies a maximum `sane' RTT value;
     * uses a macro to enforce this upper limit.
    
    Using a macro was given preference, since it is necessary to identify the
    calling function in the warning message. Since exceeding this threshold
    identifies a critical condition, DCCP_CRIT is used and not DCCP_WARN.
    
    Many thanks to Ian McDonald for collaboration on this issue.
    Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
    Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
    de553c18
ccid3.h 6.8 KB