1. 04 9月, 2008 2 次提交
    • G
      dccp: Remove manual influence on NDP Count feature · 68e074bf
      Gerrit Renker 提交于
      Updating the NDP count feature is handled automatically now:
       * for CCID-2 it is disabled, since the code does not use NDP counts;
       * for CCID-3 it is enabled, as NDP counts are used to determine loss lengths.
      
      Allowing the user to change NDP values leads to unpredictable and failing
      behaviour, since it is then possible to disable NDP counts even when they
      are needed (e.g. in CCID-3).
      
      This means that only those user settings are sensible that agree with the
      values for Send NDP Count implied by the choice of CCID. But those settings
      are already activated by the feature negotiation (CCID dependency tracking),
      hence this form of support is redundant.
      
      At startup the initialisation of the NDP count feature is with the default
      value of 0, which is done implicitly by the zeroing-out of the socket when
      it is allocated. If the choice of CCID or feature negotiation enables NDP
      count, this will then be updated via the NDP activation handler.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      68e074bf
    • G
      dccp: Deprecate Ack Ratio sysctl · 17c30b40
      Gerrit Renker 提交于
      This patch deprecates the Ack Ratio sysctl, since
       * Ack Ratio is entirely ignored by CCID-3 and CCID-4,
       * Ack Ratio currently doesn't work in CCID-2 (i.e. is always set to 1);
       * even if it would work in CCID-2, there is no point for a user to change it:
         - Ack Ratio is constrained by cwnd (RFC 4341, 6.1.2),
         - if Ack Ratio > cwnd, the system resorts to spurious RTO timeouts 
           (since waiting for Acks which will never arrive in this window),
         - cwnd is not a user-configurable value.	
      
      The only reasonable place for Ack Ratio is to print it for debugging. It is
      planned to do this later on, as part of e.g. dccp_probe.
      
      With this patch Ack Ratio is now under full control of feature negotiation:
       * Ack Ratio is resolved as a dependency of the selected CCID;
       * if the chosen CCID supports it (i.e. CCID == CCID-2), Ack Ratio is set to
         the default of 2, following RFC 4340, 11.3 - "New connections start with Ack
         Ratio 2 for both endpoints";
       * what happens then is part of another patch set, since it concerns the 
         dynamic update of Ack Ratio while the connection is in full flight.
      
      Thanks to Tomasz Grobelny for discussion leading up to this patch.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      17c30b40
  2. 29 1月, 2008 1 次提交
  3. 18 10月, 2007 1 次提交
  4. 11 10月, 2007 1 次提交
    • G
      [DCCP]: Rate-limit DCCP-Syncs · a94f0f97
      Gerrit Renker 提交于
      This implements a SHOULD from RFC 4340, 7.5.4:
       "To protect against denial-of-service attacks, DCCP implementations SHOULD
        impose a rate limit on DCCP-Syncs sent in response to sequence-invalid packets,
        such as not more than eight DCCP-Syncs per second."
      
      The rate-limit is maintained on a per-socket basis. This is a more stringent
      policy than enforcing the rate-limit on a per-source-address basis and
      protects against attacks with forged source addresses.
      
      Moreover, the mechanism is deliberately kept simple. In contrast to
      xrlim_allow(), bursts of Sync packets in reply to sequence-invalid packets
      are not supported.  This foils such attacks where the receipt of a Sync
      triggers further sequence-invalid packets. (I have tested this mechanism against
      xrlim_allow algorithm for Syncs, permitting bursts just increases the problems.)
      
      In order to keep flexibility, the timeout parameter can be set via sysctl; and
      the whole mechanism can even be disabled (which is however not recommended).
      
      The algorithm in this patch has been improved with regard to wrapping issues
      thanks to a suggestion by Arnaldo.
      
      Commiter note: Rate limited the step 6 DCCP_WARN too, as it says we're
                     sending a sync.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      a94f0f97
  5. 15 2月, 2007 2 次提交
  6. 03 12月, 2006 4 次提交
  7. 23 9月, 2006 1 次提交
  8. 01 7月, 2006 1 次提交
  9. 21 3月, 2006 1 次提交
    • A
      [DCCP] feat: Introduce sysctls for the default features · e55d912f
      Arnaldo Carvalho de Melo 提交于
      [root@qemu ~]# for a in /proc/sys/net/dccp/default/* ; do echo $a ; cat $a ; done
      /proc/sys/net/dccp/default/ack_ratio
      2
      /proc/sys/net/dccp/default/rx_ccid
      3
      /proc/sys/net/dccp/default/send_ackvec
      1
      /proc/sys/net/dccp/default/send_ndp
      1
      /proc/sys/net/dccp/default/seq_window
      100
      /proc/sys/net/dccp/default/tx_ccid
      3
      [root@qemu ~]#
      
      So if wanting to test ccid3 as the tx CCID one can just do:
      
      [root@qemu ~]# echo 3 > /proc/sys/net/dccp/default/tx_ccid
      [root@qemu ~]# echo 2 > /proc/sys/net/dccp/default/rx_ccid
      [root@qemu ~]# cat /proc/sys/net/dccp/default/[tr]x_ccid
      2
      3
      [root@qemu ~]#
      
      Of course we also need the setsockopt for each app to tell its preferences, but
      for testing or defining something other than CCID2 as the default for apps that
      don't explicitely set their preference the sysctl interface is handy.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e55d912f