• Daniel Borkmann's avatar
    net: sctp: fix permissions for rto_alpha and rto_beta knobs · b58537a1
    Daniel Borkmann authored
    Commit 3fd091e7 ("[SCTP]: Remove multiple levels of msecs
    to jiffies conversions.") has silently changed permissions for
    rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of
    this was to discourage users from tweaking rto_alpha and
    rto_beta knobs in production environments since they are key
    to correctly compute rtt/srtt.
    
    RFC4960 under section 6.3.1. RTO Calculation says regarding
    rto_alpha and rto_beta under rule C3 and C4:
    
      [...]
      C3)  When a new RTT measurement R' is made, set
    
           RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'|
    
           and
    
           SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'
    
           Note: The value of SRTT used in the update to RTTVAR
           is its value before updating SRTT itself using the
           second assignment. After the computation, update
           RTO <- SRTT + 4 * RTTVAR.
    
      C4)  When data is in flight and when allowed by rule C5
           below, a new RTT measurement MUST be made each round
           trip. Furthermore, new RTT measurements SHOULD be
           made no more than once per round trip for a given
           destination transport address. There are two reasons
           for this recommendation: First, it appears that
           measuring more frequently often does not in practice
           yield any significant benefit [ALLMAN99]; second,
           if measurements are made more often, then the values
           of RTO.Alpha and RTO.Beta in rule C3 above should be
           adjusted so that SRTT and RTTVAR still adjust to
           changes at roughly the same rate (in terms of how many
           round trips it takes them to reflect new values) as
           they would if making only one measurement per
           round-trip and using RTO.Alpha and RTO.Beta as given
           in rule C3. However, the exact nature of these
           adjustments remains a research issue.
      [...]
    
    While it is discouraged to adjust rto_alpha and rto_beta
    and not further specified how to adjust them, the RFC also
    doesn't explicitly forbid it, but rather gives a RECOMMENDED
    default value (rto_alpha=3, rto_beta=2). We have a couple
    of users relying on the old permissions before they got
    changed. That said, if someone really has the urge to adjust
    them, we could allow it with a warning in the log.
    
    Fixes: 3fd091e7 ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.")
    Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
    Cc: Vlad Yasevich <vyasevich@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b58537a1
sysctl.c 12.3 KB