21 May, 2019

1 commit


25 Jul, 2018

1 commit


03 Jan, 2018

1 commit


16 Apr, 2016

1 commit

  • This one will implement all the interface of inet_diag, inet_diag_handler.
    which includes sctp_diag_dump, sctp_diag_dump_one and sctp_diag_get_info.

    It will work as a module, and register inet_diag_handler when loading.

    v2->v3:
    - fix the mistake in inet_assoc_attr_size().

    - change inet_diag_msg_laddrs_fill() name to inet_diag_msg_sctpladdrs_fill.

    - change inet_diag_msg_paddrs_fill() name to inet_diag_msg_sctpaddrs_fill.

    - add inet_diag_msg_sctpinfo_fill() to make asoc/ep fill code clearer.

    - add inet_diag_msg_sctpasoc_fill() to make asoc fill code clearer.

    - merge inet_asoc_diag_fill() and inet_ep_diag_fill() to
    inet_sctp_diag_fill().

    - call sctp_diag_get_info() directly, instead by handler, cause the caller
    is in the same file with it.

    - call lock_sock in sctp_tsp_dump_one() to make sure we call get sctp info
    safely.

    - after lock_sock(sk), we should check sk != assoc->base.sk.

    - change mem[SK_MEMINFO_WMEM_ALLOC] to asoc->sndbuf_used for asoc dump when
    asoc->ep->sndbuf_policy is set. don't use INET_DIAG_MEMINFO attr any more.

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

    Xin Long
     

02 Jul, 2013

2 commits

  • After having reworked the debugging framework, Neil and Vlad agreed to
    get rid of the leftover SCTP_DBG_TSNS code for a couple of reasons:

    We can use systemtap scripts to investigate these things, we now have
    pr_debug() helpers that make life easier, and if we really need anything
    else besides those tools, we will be forced to come up with something
    better than we have there. Therefore, get rid of this ifdef debugging
    code entirely for now.

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

    Daniel Borkmann
     
  • We should get rid of all own SCTP debug printk macros and use the ones
    that the kernel offers anyway instead. This makes the code more readable
    and conform to the kernel code, and offers all the features of dynamic
    debbuging that pr_debug() et al has, such as only turning on/off portions
    of debug messages at runtime through debugfs. The runtime cost of having
    CONFIG_DYNAMIC_DEBUG enabled, but none of the debug statements printing,
    is negligible [1]. If kernel debugging is completly turned off, then these
    statements will also compile into "empty" functions.

    While we're at it, we also need to change the Kconfig option as it /now/
    only refers to the ifdef'ed code portions in outqueue.c that enable further
    debugging/tracing of SCTP transaction fields. Also, since SCTP_ASSERT code
    was enabled with this Kconfig option and has now been removed, we
    transform those code parts into WARNs resp. where appropriate BUG_ONs so
    that those bugs can be more easily detected as probably not many people
    have SCTP debugging permanently turned on.

    To turn on all SCTP debugging, the following steps are needed:

    # mount -t debugfs none /sys/kernel/debug
    # echo -n 'module sctp +p' > /sys/kernel/debug/dynamic_debug/control

    This can be done more fine-grained on a per file, per line basis and others
    as described in [2].

    [1] https://www.kernel.org/doc/ols/2009/ols2009-pages-39-46.pdf
    [2] Documentation/dynamic-debug-howto.txt

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

14 Feb, 2013

1 commit

  • This config item has not carried much meaning for a while now and is
    almost always enabled by default. As agreed during the Linux kernel
    summit, remove it.

    Acked-by: Vlad Yasevich
    Acked-by: Steven Whitehouse
    Signed-off-by: Kees Cook
    Signed-off-by: David Rientjes
    Signed-off-by: David S. Miller

    Kees Cook
     

08 Jan, 2013

1 commit

  • Commit 0d0863b02002 ("sctp: Change defaults on cookie hmac selection")
    added a "choice" to the sctp Kconfig file. It introduced a bug which
    led to an infinite loop when while running "make oldconfig".

    The problem is that the wrong symbol was defined as the default value
    for the choice. Using the correct value gets rid of the infinite loop.

    Note: if CONFIG_SCTP_COOKIE_HMAC_SHA1=y was present in the input
    config file, both that and CONFIG_SCTP_COOKIE_HMAC_MD5=y be present
    in the generated config file.

    Signed-off-by: Alex Elder
    Signed-off-by: Linus Torvalds

    Alex Elder
     

16 Dec, 2012

1 commit

  • Recently I posted commit 3c68198e75 which made selection of the cookie hmac
    algorithm selectable. This is all well and good, but Linus noted that it
    changes the default config:
    http://marc.info/?l=linux-netdev&m=135536629004808&w=2

    I've modified the sctp Kconfig file to reflect the recommended way of making
    this choice, using the thermal driver example specified, and brought the
    defaults back into line with the way they were prior to my origional patch

    Also, on Linus' suggestion, re-adding ability to select default 'none' hmac
    algorithm, so we don't needlessly bloat the kernel by forcing a non-none
    default. This also led me to note that we won't honor the default none
    condition properly because of how sctp_net_init is encoded. Fix that up as
    well.

    Tested by myself (allbeit fairly quickly). All configuration combinations seems
    to work soundly.

    Signed-off-by: Neil Horman
    CC: David Miller
    CC: Linus Torvalds
    CC: Vlad Yasevich
    CC: linux-sctp@vger.kernel.org
    Signed-off-by: David S. Miller

    Neil Horman
     

26 Oct, 2012

1 commit

  • Currently sctp allows for the optional use of md5 of sha1 hmac algorithms to
    generate cookie values when establishing new connections via two build time
    config options. Theres no real reason to make this a static selection. We can
    add a sysctl that allows for the dynamic selection of these algorithms at run
    time, with the default value determined by the corresponding crypto library
    availability.
    This comes in handy when, for example running a system in FIPS mode, where use
    of md5 is disallowed, but SHA1 is permitted.

    Note: This new sysctl has no corresponding socket option to select the cookie
    hmac algorithm. I chose not to implement that intentionally, as RFC 6458
    contains no option for this value, and I opted not to pollute the socket option
    namespace.

    Change notes:
    v2)
    * Updated subject to have the proper sctp prefix as per Dave M.
    * Replaced deafult selection options with new options that allow
    developers to explicitly select available hmac algs at build time
    as per suggestion by Vlad Y.

    Signed-off-by: Neil Horman
    CC: Vlad Yasevich
    CC: "David S. Miller"
    CC: netdev@vger.kernel.org
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Neil Horman
     

01 May, 2010

1 commit

  • This patch implement sctp association probing module, the module
    will be called sctp_probe.

    This module allows for capturing the changes to SCTP association
    state in response to incoming packets. It is used for debugging
    SCTP congestion control algorithms.

    Usage:
    $ modprobe sctp_probe [full=n] [port=n] [bufsize=n]
    $ cat /proc/net/sctpprobe

    The output format is:
    TIME ASSOC LPORT RPORT MTU RWND UNACK ...

    The output will be like this:
    9.226086 c4064c48 9000 8000 1500 53352 1 *192.168.0.19 1 4380 54784 1252 0 1500
    9.287195 c4064c48 9000 8000 1500 45144 5 *192.168.0.19 1 5880 54784 6500 0 1500
    9.289130 c4064c48 9000 8000 1500 42724 5 *192.168.0.19 1 7380 54784 6500 0 1500
    9.620332 c4064c48 9000 8000 1500 48284 4 *192.168.0.19 1 8880 54784 5200 0 1500
    ......

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

    Wei Yongjun
     

19 Jul, 2008

1 commit


29 Jan, 2008

1 commit


29 Nov, 2007

1 commit


25 May, 2007

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