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
     

16 Apr, 2010

1 commit

  • As Herbert Xu said: we should be able to simply replace ipfragok
    with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
    has droped ipfragok and set local_df value properly.

    The patch kills the ipfragok parameter of .queue_xmit().

    Signed-off-by: Shan Wei
    Signed-off-by: David S. Miller

    Shan Wei
     

12 Apr, 2010

1 commit


04 Apr, 2010

1 commit


31 Mar, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

21 Mar, 2010

1 commit


17 Feb, 2010

1 commit


06 Nov, 2009

2 commits


15 Sep, 2009

1 commit


23 Jun, 2009

1 commit


16 Feb, 2009

1 commit

  • During peeloff/accept() sctp needs to save the parent socket state
    into the new socket so that any options set on the parent are
    inherited by the child socket. This was found when the
    parent/listener socket issues SO_BINDTODEVICE, but the
    data was misrouted after a route cache flush.

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

    Vlad Yasevich
     

23 Jan, 2009

1 commit


30 Oct, 2008

1 commit


29 Oct, 2008

1 commit


09 Oct, 2008

1 commit


01 Oct, 2008

1 commit

  • sctp_is_any() function that is used to check for wildcard addresses
    only looks at the address itself to determine the address family.
    This function is used in the API to check the address passed in from
    the user. If the user simply zerroes out the sockaddr_storage and
    pass that in, we'll end up failing. So, let's try harder to determine
    the address family by also checking the socket if it's possible.

    Signed-off-by: Vlad Yasevich

    Vlad Yasevich
     

15 Aug, 2008

1 commit


04 Aug, 2008

1 commit

  • The ipfragok flag controls whether the packet may be fragmented
    either on the local host on beyond. The latter is only valid on
    IPv4.

    In fact, we never want to do the latter even on IPv4 when PMTU is
    enabled. This is because even though we can't fragment packets
    within SCTP due to the prtocol's inherent faults, we can still
    fragment it at IP layer. By setting the DF bit we will improve
    the PMTU process.

    RFC 2960 only says that we SHOULD clear the DF bit in this case,
    so we're compliant even if we set the DF bit. In fact RFC 4960
    no longer has this statement.

    Once we make this change, we only need to control the local
    fragmentation. There is already a bit in the skb which controls
    that, local_df. So this patch sets that instead of using the
    ipfragok argument.

    The only complication is that there isn't a struct sock object
    per transport, so for IPv4 we have to resort to changing the
    pmtudisc field for every packet. This should be safe though
    as the protocol is single-threaded.

    Note that after this patch we can remove ipfragok from the rest
    of the stack too.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

19 Jul, 2008

1 commit


05 Jun, 2008

2 commits

  • Commit e9df2e8fd8fbc95c57dbd1d33dada66c4627b44c ("[IPV6]: Use
    appropriate sock tclass setting for routing lookup.") also changed the
    way that ECN capable transports mark this capability in IPv6. As a
    result, SCTP was not marking ECN capablity because the traffic class
    was never set. This patch brings back the markings for IPv6 traffic.

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

    Vlad Yasevich
     
  • Commit 7cbca67c073263c179f605bdbbdc565ab29d801d ("[IPV6]: Support
    Source Address Selection API (RFC5014)") introduced NULL dereference
    of asoc to sctp_v6_get_saddr in net/sctp/ipv6.c.
    Pointed out by Johann Felix Soden .

    Signed-off-by: YOSHIFUJI Hideaki

    YOSHIFUJI Hideaki
     

14 Apr, 2008

1 commit


13 Apr, 2008

1 commit

  • All IP addresses that are present in a system are duplicated on
    struct sctp_sockaddr_entry. They are linked in the global list
    called sctp_local_addr_list. And this struct unions IPv4 and IPv6
    addresses.

    So, there can be rare case, when a sockaddr_in.sin_addr coincides
    with the corresponding part of the sockaddr_in6 and the notifier
    for IPv4 will carry away an IPv6 entry.

    The fix is to check the family before comparing the addresses.

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

    Pavel Emelyanov
     

26 Mar, 2008

1 commit


25 Mar, 2008

1 commit


21 Mar, 2008

2 commits

  • David S. Miller
     
  • 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: Vlad Yasevich
    Acked-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

18 Mar, 2008

1 commit


12 Mar, 2008

1 commit


06 Mar, 2008

2 commits


04 Mar, 2008

1 commit


29 Feb, 2008

1 commit

  • I noticed while looking into some odd behavior in sctp, that the variable
    name sctp_pf_inet6_specific was used twice to represent two different
    pieces of data (its both a structure name and a pointer to that type of
    structure), which is confusing to say the least, and potentially dangerous
    depending on the variable scope. This patch cleans that up, and makes the
    protocol and address family registration names in SCTP more regular,
    increasing readability.

    Signed-off-by: Neil Horman
    Signed-off-by: Vlad Yasevich

    ipv6.c | 12 ++++++------
    protocol.c | 12 ++++++------
    2 files changed, 12 insertions(+), 12 deletions(-)

    Neil Horman
     

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

2 commits


01 Nov, 2007

1 commit

  • Finally, the zero_it argument can be completely removed from
    the callers and from the function prototype.

    Besides, fix the checkpatch.pl warnings about using the
    assignments inside if-s.

    This patch is rather big, and it is a part of the previous one.
    I splitted it wishing to make the patches more readable. Hope
    this particular split helped.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

16 Oct, 2007

1 commit