1. 04 9月, 2008 4 次提交
    • 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
    • G
      dccp: Limit feature negotiation to connection setup phase · 5591d286
      Gerrit Renker 提交于
      This patch starts the new implementation of feature negotiation:
       1. Although it is theoretically possible to perform feature negotiation at any
          time (and RFC 4340 supports this), in practice this is prohibitively complex,
          as it requires to put traffic on hold for each new negotiation.
       2. As a byproduct of restricting feature negotiation to connection setup, the
          feature-negotiation retransmit timer is no longer required. This part is now
          mapped onto the protocol-level retransmission.
          Details indicating why timers are no longer needed can be found on
          http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/feature_negotiation/\
      	                                      implementation_notes.html
      
      This patch disables anytime negotiation, subsequent patches work out full
      feature negotiation support for connection setup.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      5591d286
    • G
      dccp: Fill in the Data fields for "Option Error" Resets · eac7726b
      Gerrit Renker 提交于
      This updates the use of the `out_invalid_option' label, which produces a 
      Reset (code 5, "Option Error"), to fill in the  Data1...Data3 fields as
      specified in RFC 4340, 5.6.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      eac7726b
    • G
      dccp: Silently ignore options with nonsensical lengths · faf61c33
      Gerrit Renker 提交于
      This updates the option-parsing code with regard to RFC 4340, 5.8:
       "[..] options with nonsensical lengths (length byte less than two or more
        than the remaining space in the options portion of the header) MUST be
        ignored, and any option space following an option with nonsensical length
        MUST likewise be ignored."
      
      Hence in the following cases erratic options will be ignored:
       1. The type byte of a multi-byte option is the last byte of the header
          options (i.e. effective option length of 1).
       2. The value of the length byte is less than the minimum 2. This has been 
          changed from previously 3: although no multi-byte option with a length
          less than 3 yet exists (cf. table 3 in 5.8), a length of 2 is valid.
          (The switch-statement in dccp_parse has further per-option length checks.)
       3. The option length exceeds the length of the remaining option space.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      faf61c33
  2. 13 7月, 2008 1 次提交
  3. 11 6月, 2008 1 次提交
    • G
      dccp ccid-2: Bug-Fix - Ack Vectors need to be ignored on request sockets · 65907a43
      Gerrit Renker 提交于
      This fixes an oversight from an earlier patch, ensuring that Ack Vectors
      are not processed on request sockets.
      
      The issue is that Ack Vectors must not be parsed on request sockets, since
      the Ack Vector feature depends on the selection of the (TX) CCID. During the
      initial handshake the CCIDs are undefined, and so RFC 4340, 10.3 applies:
      
       "Using CCID-specific options and feature options during a negotiation
        for the corresponding CCID feature is NOT RECOMMENDED [...]"
      
      And it is not even possible: when the server receives the Request from the 
      client, the CCID and Ack vector features are undefined; when the Ack finalising
      the 3-way hanshake arrives, the request socket has not been cloned yet into a
      full socket. (This order is necessary, since otherwise the newly created socket
      would have to be destroyed whenever an option error occurred - a malicious
      hacker could simply send garbage options and exploit this.)
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      65907a43
  4. 29 1月, 2008 5 次提交
  5. 24 10月, 2007 1 次提交
  6. 11 10月, 2007 6 次提交
  7. 26 4月, 2007 3 次提交
  8. 11 2月, 2007 1 次提交
  9. 12 12月, 2006 1 次提交
    • G
      [DCCP] ccid: Deprecate ccid_hc_tx_insert_options · 65d6c2b4
      Gerrit Renker 提交于
       The function ccid3_hc_tx_insert_options only does a redundant no-op,
       as the operation
      
        DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count;
      
       is already performed _unconditionally_ in ccid3_hc_tx_send_packet.
      
       Since there is further no current need for this function, it is removed
       entirely. Since furthermore, there is actually no present need for the
       entire interface function ccid_hc_tx_insert_options, it was decided to
       remove it also, to clean up the interface.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      65d6c2b4
  10. 03 12月, 2006 5 次提交
    • A
      [DCCP] ackvec: infrastructure for sending more than one ackvec per packet · bdf13d20
      Andrea Bittau 提交于
      Commiter note:
      
      This was split from Andrea's original patch, in the process I changed the type
      of the ackvec index fields to u16 instead of to int and haven't folded
      dccp_ackvec_parse with dccp_ackvec_check_rcv_ackno.
      
      Next patch will actually do the insertion of more than one ackvec per packet,
      using, initially, up to a max of 2 ackvecs as per Andrea's original patch, then
      I'll work on support for larger ackvecs, be it using a sysctl or using
      setsockopt.
      Signed-off-by: NAndrea Bittau <a.bittau@cs.ucl.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      bdf13d20
    • G
      [DCCP]: Simplified conditions due to use of enum:8 states · 59348b19
      Gerrit Renker 提交于
      This reaps the benefit of the earlier patch, which changed the type of
      CCID 3 states to use enums, in that many conditions are now simplified
      and the number of possible (unexpected) values is greatly reduced.
      
      In a few instances, this also allowed to simplify pre-conditions; where
      care has been taken to retain logical equivalence.
      
      [DCCP]: Introduce a consistent BUG/WARN message scheme
      
      This refines the existing set of DCCP messages so that
       * BUG(), BUG_ON(), WARN_ON() have meaningful DCCP-specific counterparts
       * DCCP_CRIT (for severe warnings) is not rate-limited
       * DCCP_WARN() is introduced as rate-limited wrapper
      
      Using these allows a faster and cleaner transition to their original
      counterparts once the code has matured into a full DCCP implementation.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      59348b19
    • G
      [DCCP]: Miscellaneous code tidy-ups · 09dbc389
      Gerrit Renker 提交于
      This patch does not change code; it performs some trivial clean/tidy-ups:
      
        * removal of a `debug_prefix' string in favour of the
          already existing dccp_role(sk)
      
        * add documentation of structures and constants
      
        * separated out the cases for invalid packets (step 1
          of the packet validation)
      
        * removing duplicate statements
      
        * combining declaration & initialisation
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      09dbc389
    • G
      [DCCP]: Make feature negotiation more readable · c02fdc0e
      Gerrit Renker 提交于
      This patch replaces cryptic feature negotiation messages of type
      
      Oct 31 15:42:20 kernel: dccp_feat_change: feat change type=32 feat=1
      Oct 31 15:42:21 kernel: dccp_feat_change: feat change type=34 feat=1
      Oct 31 15:42:21 kernel: dccp_feat_change: feat change type=32 feat=5
      
      into ones of type:
      
      Nov  2 13:54:45 kernel: dccp_feat_change: ChangeL(CCID (1), 3)
      Nov  2 13:54:45 kernel: dccp_feat_change: ChangeR(CCID (1), 3)
      Nov  2 13:54:45 kernel: dccp_feat_change: ChangeL(Ack Ratio (5), 2)
      
      Also,
      	* completed the feature number list wrt RFC 4340 sec. 6.4
      	* annotating which ones have been implemented so far
      	* implemented rudimentary sanity checking in feat.c (FIXMEs)
      	* some minor fixes
      
      Commiter note: uninlined dccp_feat_name and dccp_feat_typename, for
                     consistency with dccp_{state,packet}_name, that, BTW,
                     should be compiled only if CONFIG_IP_DCCP_DEBUG is
                     selected, leaving this to another cset tho. Also
                     shortened dccp_feat_negotiation_debug to dccp_feat_debug.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      c02fdc0e
    • G
      [DCCP]: Introduce a consistent naming scheme for sysctls · afb0a34d
      Gerrit Renker 提交于
      In order to make their function clearer and obtain a consistent naming
      scheme to identify sysctls, all existing DCCP sysctls have been prefixed
      with `sysctl_dccp', following the same convention as used by TCP.
      
      Feature-specific sysctls retain the `feat' in the middle, although the
      `default' has been dropped, since it is obvious from use.
      
      Also removed a duplicate `dccp_feat_default_sequence_window' in ipv4.c.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      afb0a34d
  11. 25 10月, 2006 1 次提交
  12. 27 8月, 2006 1 次提交
  13. 25 7月, 2006 1 次提交
    • I
      [DCCP]: Fix default sequence window size · 4b79f0af
      Ian McDonald 提交于
      When using the default sequence window size (100) I got the following in
      my logs:
      
      Jun 22 14:24:09 localhost kernel: [ 1492.114775] DCCP: Step 6 failed for
      DATA packet, (LSWL(6279674225) <= P.seqno(6279674749) <=
      S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
      P.ackno(1125899906842620) <= S.AWH(18798206548), sending SYNC...
      Jun 22 14:24:09 localhost kernel: [ 1492.115147] DCCP: Step 6 failed for
      DATA packet, (LSWL(6279674225) <= P.seqno(6279674750) <=
      S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
      P.ackno(1125899906842620) <= S.AWH(18798206549), sending SYNC...
      
      I went to alter the default sysctl and it didn't take for new sockets.
      Below patch fixes this.
      
      I think the default is too low but it is what the DCCP spec specifies.
      
      As a side effect of this my rx speed using iperf goes from about 2.8 Mbits/sec
      to 3.5. This is still far too slow but it is a step in the right direction.
      
      Compile tested only for IPv6 but not particularly complex change.
      
      Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b79f0af
  14. 01 7月, 2006 1 次提交
  15. 21 3月, 2006 8 次提交