1. 21 3月, 2008 1 次提交
    • V
      [SCTP]: Fix a race between module load and protosw access · 270637ab
      Vlad Yasevich 提交于
      There is a race is SCTP between the loading of the module
      and the access by the socket layer to the protocol functions.
      In particular, a list of addresss that SCTP maintains is
      not initialized prior to the registration with the protosw.
      Thus it is possible for a user application to gain access
      to SCTP functions before everything has been initialized.
      The problem shows up as odd crashes during connection
      initializtion when we try to access the SCTP address list.
      
      The solution is to refactor how we do registration and
      initialize the lists prior to registering with the protosw.
      Care must be taken since the address list initialization
      depends on some other pieces of SCTP initialization.  Also
      the clean-up in case of failure now also needs to be refactored.
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Acked-by: NSridhar Samudrala <sri@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      270637ab
  2. 18 3月, 2008 2 次提交
  3. 12 3月, 2008 1 次提交
  4. 06 3月, 2008 2 次提交
    • N
      [SCTP]: Bring MAX_BURST socket option into ietf API extension compliance · 219b99a9
      Neil Horman 提交于
      Brings max_burst socket option set/get into line with the latest ietf
      socket extensions api draft, while maintaining backwards
      compatibility.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      219b99a9
    • G
      SCTP: Fix chunk parameter processing bug · 140ee960
      Gui Jianfeng 提交于
      If an address family is not listed in "Supported Address Types"
      parameter(INIT Chunk), but the packet is sent by that family, this
      address family should be considered as supported by peer.  Otherwise,
      an error condition will occur. For instance, if kernel receives an
      IPV6 SCTP INIT chunk with "Support Address Types" parameter which
      indicates just supporting IPV4 Address family. Kernel will reply an
      IPV6 SCTP INIT ACK packet, but the source ipv6 address in ipv6 header
      will be vacant. This is not correct.
      
      refer to RFC4460 as following:
            IMPLEMENTATION NOTE: If an SCTP endpoint lists in the 'Supported
            Address Types' parameter either IPv4 or IPv6, but uses the other
            family for sending the packet containing the INIT chunk, or if it
            also lists addresses of the other family in the INIT chunk, then
            the address family that is not listed in the 'Supported Address
            Types' parameter SHOULD also be considered as supported by the
            receiver of the INIT chunk.  The receiver of the INIT chunk SHOULD
            NOT respond with any kind of error indication.
      
      Here is a fix to comply to RFC.
      Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
      Acked-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      140ee960
  5. 01 3月, 2008 1 次提交
  6. 29 2月, 2008 4 次提交
  7. 28 2月, 2008 1 次提交
  8. 20 2月, 2008 1 次提交
  9. 10 2月, 2008 2 次提交
  10. 07 2月, 2008 4 次提交
  11. 05 2月, 2008 5 次提交
    • V
      [SCTP]: Kill silly inlines in ulpqueue.c · 01f2d384
      Vlad Yasevich 提交于
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      01f2d384
    • V
      [SCTP]: Do not increase rwnd when reading partial notification. · 0eca8fee
      Vlad Yasevich 提交于
      When a user reads a partial notification message, do not
      update rwnd since notifications must not be counted towards
      receive window.
      Tested-by: NOliver Roll <mail@oliroll.de>
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      0eca8fee
    • V
      [SCTP]: Stop claiming that this is a "reference implementation" · 60c778b2
      Vlad Yasevich 提交于
      I was notified by Randy Stewart that lksctp claims to be
      "the reference implementation".  First of all, "the
      refrence implementation" was the original implementation
      of SCTP in usersapce written ty Randy and a few others.
      Second, after looking at the definiton of 'reference implementation',
      we don't really meet the requirements.
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      60c778b2
    • W
      [SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier · 7cc08b55
      Wei Yongjun 提交于
      If SCTP-AUTH is enabled, received AUTH chunk with BAD shared key 
      identifier will cause kernel panic.
      
      Test as following:
      step1: enabled /proc/sys/net/sctp/auth_enable
      step 2:  connect  to SCTP server with auth capable. Association is 
      established between endpoints. Then send a AUTH chunk with a bad 
      shareid, SCTP server will kernel panic after received that AUTH chunk.
      
      SCTP client                   SCTP server
        INIT         ---------->  
          (with auth capable)
                     <----------    INIT-ACK
                                    (with auth capable)
        COOKIE-ECHO  ---------->
                     <----------    COOKIE-ACK
        AUTH         ---------->
      
      
      AUTH chunk is like this:
        AUTH chunk
          Chunk type: AUTH (15)
          Chunk flags: 0x00
          Chunk length: 28
          Shared key identifier: 10
          HMAC identifier: SHA-1 (1)
          HMAC: 0000000000000000000000000000000000000000
      
      The assignment of NULL to key can safely be removed, since key_for_each 
      (which is just list_for_each_entry under the covers does an initial 
      assignment to key anyway).
      
      If the endpoint_shared_keys list is empty, or if the key_id being 
      requested does not exist, the function as it currently stands returns 
      the actuall list_head (in this case endpoint_shared_keys.  Since that 
      list_head isn't surrounded by an actuall data structure, the last 
      iteration through list_for_each_entry will do a container_of on key, and 
      we wind up returning a bogus pointer, instead of NULL, as we should.
      
      > Neil Horman wrote:
      >> On Tue, Jan 22, 2008 at 05:29:20PM +0900, Wei Yongjun wrote:
      >>
      >> FWIW, Ack from me.  The assignment of NULL to key can safely be 
      >> removed, since
      >> key_for_each (which is just list_for_each_entry under the covers does 
      >> an initial
      >> assignment to key anyway).
      >> If the endpoint_shared_keys list is empty, or if the key_id being 
      >> requested does
      >> not exist, the function as it currently stands returns the actuall 
      >> list_head (in
      >> this case endpoint_shared_keys.  Since that list_head isn't 
      >> surrounded by an
      >> actuall data structure, the last iteration through 
      >> list_for_each_entry will do a
      >> container_of on key, and we wind up returning a bogus pointer, 
      >> instead of NULL,
      >> as we should.  Wei's patch corrects that.
      >>
      >> Regards
      >> Neil
      >>
      >> Acked-by: Neil Horman <nhorman@tuxdriver.com>
      >>
      >
      > Yep, the patch is correct.
      >
      > Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
      >
      > -vlad
      >
      Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cc08b55
    • W
      [SCTP]: Fix kernel panic while received AUTH chunk while enabled auth · d2f19fa1
      Wei Yongjun 提交于
      If STCP is started while /proc/sys/net/sctp/auth_enable is set 0 and
      association is established between endpoints. Then if
      /proc/sys/net/sctp/auth_enable is set 1, a received AUTH chunk will
      cause kernel panic.
      
      Test as following:
      step 1: echo 0> /proc/sys/net/sctp/auth_enable
      step 2:
      
         SCTP client                  SCTP server
            INIT          --------->
                          <---------   INIT-ACK
            COOKIE-ECHO   --------->
                          <---------   COOKIE-ACK
      step 3:
          echo 1> /proc/sys/net/sctp/auth_enable
      step 4:
         SCTP client                  SCTP server
             AUTH        ----------->  Kernel Panic
      
      
      This patch fix this probleam to treat AUTH chunk as unknow chunk if peer 
      has initialized with no auth capable.
      
      > Sorry for the delay.  Was on vacation without net access.
      >
      > Wei Yongjun wrote:
      >>
      >>
      >> This patch fix this probleam to treat AUTH chunk as unknow chunk if 
      >> peer has initialized with no auth capable.
      >>
      >> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
      >
      > Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
      >
      >>
      Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
      Acked-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2f19fa1
  12. 03 2月, 2008 1 次提交
  13. 01 2月, 2008 1 次提交
  14. 29 1月, 2008 14 次提交