1. 29 Aug, 2008 12 commits
  2. 27 Aug, 2008 10 commits
    • David S. Miller's avatar
    • Gerrit Renker's avatar
      dccp ccid-3: Replace lazy BUG_ON with condition · eff253c4
      Gerrit Renker authored
      The BUG_ON(w_tot == 0) only holds if there is no more than 1 loss interval in
      the loss history. If there is only a single loss interval, the calc_i_mean()
      routine need in fact not be called (RFC 3448, 6.3.1). 
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      eff253c4
    • Gerrit Renker's avatar
      dccp: Toggle debug output without module unloading · 157439fa
      Gerrit Renker authored
      This sets the sysfs permissions so that root can toggle the `debug'
      parameter available for nearly every DCCP module. This is useful 
      since there are various module inter-dependencies. The debug flag
      can now be toggled at runtime using
      
        echo 1 > /sys/module/dccp/parameters/dccp_debug
        echo 1 > /sys/module/dccp_ccid2/parameters/ccid2_debug
        echo 1 > /sys/module/dccp_ccid3/parameters/ccid3_debug
        echo 1 > /sys/module/dccp_tfrc_lib/parameters/tfrc_debug
      
      The last is not very useful yet, since no code at the moment calls
      the tfrc_debug() macro.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      157439fa
    • Gerrit Renker's avatar
      dccp: Empty the write queue when disconnecting · b569d5a1
      Gerrit Renker authored
      dccp_disconnect() can be called due to several reasons:
      
       1. when the connection setup failed (inet_stream_connect());
       2. when shutting down (inet_shutdown(), inet_csk_listen_stop());
       3. when aborting the connection (dccp_close() with 0 linger time).
      
      In case (1) the write queue is empty. This patch empties the write queue,
      if in case (2) or (3) it was not yet empty.
      
      This avoids triggering the write-queue BUG_TRAP in sk_stream_kill_queues()
      later on.
      
      It also seems natural to do: when breaking an association, to delete all
      packets that were originally intended for the soon-disconnected end (compare
      with call to tcp_write_queue_purge in tcp_disconnect()).
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      b569d5a1
    • Gerrit Renker's avatar
      dccp: Fill in the Data fields for "Option Error" Resets · 5a056417
      Gerrit Renker authored
      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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      5a056417
    • Gerrit Renker's avatar
      dccp: Silently ignore options with nonsensical lengths · 1efa6bba
      Gerrit Renker authored
      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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      1efa6bba
    • Wei Yongjun's avatar
      dccp: Always generate a Reset in response to option errors · 33c44967
      Wei Yongjun authored
      RFC4340 states that if a packet is received with an option error (such as a
      Mandatory Option as the last byte of the option list), the endpoint should
      repond with a Reset.
      
      In the LISTEN and RESPOND states, the endpoint correctly reponds with Reset,
      while in the REQUEST/OPEN states, packets with option errors are just ignored.
      
      The packet sequence is as follows:
      
      Case 1:
      
        Endpoint A                           Endpoint B
        (CLOSED)                             (CLOSED)
      
                     <----------------       REQUEST
      
        RESPONSE     ----------------->      (*1)
        (with invalid option)
                     <----------------       RESET
                                             (with Reset Code 5, "Option Error")
      
        (*1) currently just ignored, no Reset is sent
      
      Case 2:
      
        Endpoint A                           Endpoint B
        (OPEN)                               (OPEN)
      
        DATA-ACK     ----------------->      (*2)
        (with invalid option)
                     <----------------       RESET
                                             (with Reset Code 5, "Option Error")
      
        (*2) currently just ignored, no Reset is sent
      
      This patch fixes the problem, by generating a Reset instead of silently
      ignoring option errors.
      Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      33c44967
    • Simon Horman's avatar
      Merge branch 'master' of... · 7fd10678
      Simon Horman authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-2.6 into lvs-next-2.6
      7fd10678
    • Julius Volz's avatar
      IPVS: Rename ip_vs_proto_ah.c to ip_vs_proto_ah_esp.c · e3c2ced8
      Julius Volz authored
      After integrating ESP into ip_vs_proto_ah, rename it (and the references to
      it) to ip_vs_proto_ah_esp.c and delete the old ip_vs_proto_esp.c.
      Signed-off-by: default avatarJulius Volz <juliusv@google.com>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      e3c2ced8
    • Julius Volz's avatar
      IPVS: Integrate ESP protocol into ip_vs_proto_ah.c · 409a1966
      Julius Volz authored
      Rename all ah_* functions to ah_esp_* (and adjust comments). Move ESP
      protocol definition into ip_vs_proto_ah.c and remove all usage of
      ip_vs_proto_esp.c.
      
      Make the compilation of ip_vs_proto_ah.c dependent on a new config
      variable, IP_VS_PROTO_AH_ESP, which is selected either by
      IP_VS_PROTO_ESP or IP_VS_PROTO_AH. Only compile the selected protocols'
      structures within this file.
      Signed-off-by: default avatarJulius Volz <juliusv@google.com>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      409a1966
  3. 23 Aug, 2008 3 commits
  4. 22 Aug, 2008 15 commits