20 Aug, 2019

1 commit

  • The netns sctp feature flags shouldn't work as a global switch,
    which is mostly like a firewall/netfilter's job. Also, it will
    break asoc as it discard or accept chunks incorrectly when net
    sctp.x_enable is changed after the asoc is created.

    Since each type of chunk's processing function will check the
    corresp asoc's feature flag, this 'global switch' should be
    removed, and net sctp.x_enable will only work as the default
    feature flags for the future sctp sockets/endpoints.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this sctp implementation is free software you can redistribute it
    and or modify it under the terms of the gnu general public license
    as published by the free software foundation either version 2 or at
    your option any later version this sctp implementation is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with gnu cc see the file copying if not see
    http www gnu org licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 42 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190523091649.683323110@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 Nov, 2018

1 commit


16 Dec, 2017

1 commit

  • validate_ftsn is added as a member of sctp_stream_interleave, used to
    validate ssn/chunk type for fwdtsn or mid (message id)/chunk type for
    ifwdtsn, called in sctp_sf_eat_fwd_tsn, just as validate_data.

    If this check fails, an abort packet will be sent, as said in section
    2.3.1 of RFC8260.

    As ifwdtsn and fwdtsn chunks have different length, it also defines
    ftsn_chunk_len for sctp_stream_interleave to describe the chunk size.
    Then it replaces all sizeof(struct sctp_fwdtsn_chunk) with
    sctp_ftsnchk_len.

    It also adds the process for ifwdtsn in rx path. As Marcelo pointed
    out, there's no need to add event table for ifwdtsn, but just share
    prsctp_chunk_event_table with fwdtsn's. It would drop fwdtsn chunk
    for ifwdtsn and drop ifwdtsn chunk for fwdtsn by calling validate_ftsn
    in sctp_sf_eat_fwd_tsn.

    After this patch, the ifwdtsn can be accepted.

    Note that this patch also removes the sctp.intl_enable check for
    idata chunks in sctp_chunk_event_lookup, as it will do this check
    in validate_data later.

    Signed-off-by: Xin Long
    Acked-by: Marcelo R. Leitner
    Signed-off-by: David S. Miller

    Xin Long
     

12 Dec, 2017

1 commit

  • validate_data is added as a member of sctp_stream_interleave, used
    to validate ssn/chunk type for data or mid (message id)/chunk type
    for idata, called in sctp_eat_data.

    If this check fails, an abort packet will be sent, as said in
    section 2.2.3 of RFC8260.

    It also adds the process for idata in rx path. As Marcelo pointed
    out, there's no need to add event table for idata, but just share
    chunk_event_table with data's. It would drop data chunk for idata
    and drop idata chunk for data by calling validate_data in
    sctp_eat_data.

    As last patch did, it also replaces sizeof(struct sctp_data_chunk)
    with sctp_datachk_len for rx path.

    After this patch, the idata can be accepted and delivered to ulp
    layer.

    Signed-off-by: Xin Long
    Acked-by: Marcelo Ricardo Leitner
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Xin Long
     

12 Aug, 2017

1 commit


07 Aug, 2017

3 commits

  • This patch is to remove the typedef sctp_subtype_t, and
    replace with union sctp_subtype in the places where it's
    using this typedef.

    Note that it doesn't fix many indents although it should,
    as sctp_disposition_t's removal would mess them up again.
    So better to fix them when removing sctp_disposition_t in
    later patch.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     
  • This patch is to remove the typedef sctp_event_t, and
    replace with enum sctp_event in the places where it's
    using this typedef.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     
  • This patch is to remove the typedef sctp_state_t, and
    replace with enum sctp_state in the places where it's
    using this typedef.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

02 Jul, 2017

1 commit


20 Feb, 2017

1 commit

  • This patch is to add reconf chunk event based on the sctp event
    frame in rx path, it will call sctp_sf_do_reconf to process the
    reconf chunk.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

19 Jan, 2017

2 commits

  • This patch is to add a primitive based on sctp primitive frame for
    sending stream reconf request. It works as the other primitives,
    and create a SCTP_CMD_REPLY command to send the request chunk out.

    sctp_primitive_RECONF would be the api to send a reconf request
    chunk.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     
  • This patch is to add a per transport timer based on sctp timer frame
    for stream reconf chunk retransmission. It would start after sending
    a reconf request chunk, and stop after receiving the response chunk.

    If the timer expires, besides retransmitting the reconf request chunk,
    it would also do the same thing with data RTO timer. like to increase
    the appropriate error counts, and perform threshold management, possibly
    destroying the asoc if sctp retransmission thresholds are exceeded, just
    as section 5.1.1 describes.

    This patch is also to add asoc strreset_chunk, it is used to save the
    reconf request chunk, so that it can be retransmitted, and to check if
    the response is really for this request by comparing the information
    inside with the response chunk as well.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

27 Dec, 2013

1 commit


07 Dec, 2013

1 commit

  • Several files refer to an old address for the Free Software Foundation
    in the file header comment. Resolve by replacing the address with
    the URL so that we do not have to keep
    updating the header comments anytime the address changes.

    CC: Vlad Yasevich
    CC: Neil Horman
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Kirsher
     

10 Aug, 2013

1 commit

  • With the restructuring of the lksctp.org site, we only allow bug
    reports through the SCTP mailing list linux-sctp@vger.kernel.org,
    not via SF, as SF is only used for web hosting and nothing more.
    While at it, also remove the obvious statement that bugs will be
    fixed and incooperated into the kernel.

    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

25 Jul, 2013

1 commit

  • The SCTP mailing list address to send patches or questions
    to is linux-sctp@vger.kernel.org and not
    lksctp-developers@lists.sourceforge.net anymore. Therefore,
    update all occurences.

    Signed-off-by: Daniel Borkmann
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

15 Aug, 2012

2 commits


08 Jul, 2011

1 commit

  • When initiating a graceful shutdown while having data chunks
    on the retransmission queue with a peer which is in zero
    window mode the shutdown is never completed because the
    retransmission error count is reset periodically by the
    following two rules:

    - Do not timeout association while doing zero window probe.
    - Reset overall error count when a heartbeat request has
    been acknowledged.

    The graceful shutdown will wait for all outstanding TSN to
    be acknowledged before sending the SHUTDOWN request. This
    never happens due to the peer's zero window not acknowledging
    the continuously retransmitted data chunks. Although the
    error counter is incremented for each failed retransmission,
    the receiving of the SACK announcing the zero window clears
    the error count again immediately. Also heartbeat requests
    continue to be sent periodically. The peer acknowledges these
    requests causing the error counter to be reset as well.

    This patch changes behaviour to only reset the overall error
    counter for the above rules while not in shutdown. After
    reaching the maximum number of retransmission attempts, the
    T5 shutdown guard timer is scheduled to give the receiver
    some additional time to recover. The timer is stopped as soon
    as the receiver acknowledges any data.

    The issue can be easily reproduced by establishing a sctp
    association over the loopback device, constantly queueing
    data at the sender while not reading any at the receiver.
    Wait for the window to reach zero, then initiate a shutdown
    by killing both processes simultaneously. The association
    will never be freed and the chunks on the retransmission
    queue will be retransmitted indefinitely.

    Signed-off-by: Thomas Graf
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Thomas Graf
     

22 Apr, 2011

1 commit

  • This patch implement event notification SCTP_SENDER_DRY_EVENT.
    SCTP Socket API Extensions:

    6.1.9. SCTP_SENDER_DRY_EVENT

    When the SCTP stack has no more user data to send or retransmit, this
    notification is given to the user. Also, at the time when a user app
    subscribes to this event, if there is no data to be sent or
    retransmit, the stack will immediately send up this notification.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

20 Apr, 2011

1 commit


27 Aug, 2010

1 commit

  • Change SCTP_DEBUG_PRINTK and SCTP_DEBUG_PRINTK_IPADDR to
    use do { print } while (0) guards.
    Add SCTP_DEBUG_PRINTK_CONT to fix errors in log when
    lines were continued.
    Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
    Add a missing newline in "Failed bind hash alloc"

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

03 Jun, 2009

1 commit


23 Oct, 2008

2 commits

  • Once an endpoint has reached the SHUTDOWN-RECEIVED state,
    it MUST NOT send a SHUTDOWN in response to a ULP request.
    The Cumulative TSN Ack of the received SHUTDOWN chunk
    MUST be processed.

    This patch fix to process Cumulative TSN Ack of the received
    SHUTDOWN chunk in SHUTDOWN_RECEIVED state.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • If SHUTDOWN is received in SHUTDOWN-PENDING state, enpoint should enter
    the SHUTDOWN-RECEIVED state and check the Cumulative TSN Ack field of
    the SHUTDOWN chunk (RFC 4960 Section 9.2). If the SHUTDOWN chunk can
    acknowledge all of the send DATA chunks, SHUTDOWN-ACK should be sent.

    But now endpoint just silently discarded the SHUTDOWN chunk.

    SHUTDOWN received in SHUTDOWN-PENDING state can happend when the last
    SACK is lost by network, or the SHUTDOWN chunk can acknowledge all of
    the received DATA chunks. The packet sequence(SACK lost) is like this:

    Endpoint A Endpoint B ULP
    (ESTABLISHED) (ESTABLISHED)

    SHUTDOWN(*1) ------------>


    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

01 Oct, 2008

1 commit

  • RFC 4960: Section 9.2
    The sender of the SHUTDOWN MAY also start an overall guard timer
    'T5-shutdown-guard' to bound the overall time for the shutdown
    sequence. At the expiration of this timer, the sender SHOULD abort
    the association by sending an ABORT chunk. If the 'T5-shutdown-
    guard' timer is used, it SHOULD be set to the recommended value of 5
    times 'RTO.Max'.

    The timer 'T5-shutdown-guard' is used to counter the overall time
    for shutdown sequence, and it's start by the sender of the SHUTDOWN.
    So timer 'T5-shutdown-guard' should be start when we send the first
    SHUTDOWN chunk and enter the SHUTDOWN-SENT state, not start when we
    receipt of the SHUTDOWN primitive and enter SHUTDOWN-PENDING state.

    If 'T5-shutdown-guard' timer is start at SHUTDOWN-PENDING state, the
    association may be ABORT while data is still transmitting.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich

    Wei Yongjun
     

05 Feb, 2008

1 commit

  • 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: Vlad Yasevich

    Vlad Yasevich
     

29 Jan, 2008

1 commit


11 Oct, 2007

1 commit


26 Sep, 2007

1 commit


04 Jun, 2007

1 commit


26 Apr, 2007

1 commit

  • Spring cleaning time...

    There seems to be a lot of places in the network code that have
    extra bogus semicolons after conditionals. Most commonly is a
    bogus semicolon after: switch() { }

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

11 Feb, 2007

1 commit


24 Jan, 2007

1 commit


03 Dec, 2006

1 commit

  • I noticed an insane high density of repeated characters fixable by a
    simple regular expression:

    % s/{.fn = \([^,]*\),[[:space:]]\+\(\\\n[[:space:]]\+\)\?.name = "\1"}/TYPE_SCTP_FUNC(\1)/g

    (NOTE: the .name for .fn = sctp_sf_do_9_2_start_shutdown didn't match)

    Signed-off-by: Peter Zijlstra
    Signed-off-by: David S. Miller

    Peter Zijlstra
     

06 May, 2006

1 commit


21 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds