24 Dec, 2011

1 commit


20 Dec, 2011

1 commit

  • Commit 8ffd3208 voids the previous patches f6778aab and 810c0719 for
    limiting the autoclose value. If userspace passes in -1 on 32-bit
    platform, the overflow check didn't work and autoclose would be set
    to 0xffffffff.

    This patch defines a max_autoclose (in seconds) for limiting the value
    and exposes it through sysctl, with the following intentions.

    1) Avoid overflowing autoclose * HZ.

    2) Keep the default autoclose bound consistent across 32- and 64-bit
    platforms (INT_MAX / HZ in this patch).

    3) Keep the autoclose value consistent between setsockopt() and
    getsockopt() calls.

    Suggested-by: Vlad Yasevich
    Signed-off-by: Xi Wang
    Signed-off-by: David S. Miller

    Xi Wang
     

12 Dec, 2011

1 commit


23 Nov, 2011

1 commit


01 Nov, 2011

1 commit


14 Jul, 2011

1 commit


09 Jul, 2011

1 commit

  • Trigger user ABORT if application closes a socket which has data
    queued on the socket receive queue or chunks waiting on the
    reassembly or ordering queue as this would imply data being lost
    which defeats the point of a graceful shutdown.

    This behavior is already practiced in TCP.

    We do not check the input queue because that would mean to parse
    all chunks on it to look for unacknowledged data which seems too
    much of an effort. Control chunks or duplicated chunks may also
    be in the input queue and should not be stopping a graceful
    shutdown.

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

    Thomas Graf
     

07 Jul, 2011

1 commit


02 Jul, 2011

1 commit

  • Make the case labels the same indent as the switch.

    git diff -w shows useless break;s removed after returns
    and a comment added to an unnecessary default: break;
    because of a dubious gcc warning.

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

    Joe Perches
     

17 Jun, 2011

1 commit

  • Unnecessary casts of void * clutter the code.

    These are the remainder casts after several specific
    patches to remove netdev_priv and dev_priv.

    Done via coccinelle script:

    $ cat cast_void_pointer.cocci
    @@
    type T;
    T *pt;
    void *pv;
    @@

    - pt = (T *)pv;
    + pt = pv;

    Signed-off-by: Joe Perches
    Acked-by: Paul Moore
    Signed-off-by: David S. Miller

    Joe Perches
     

12 Jun, 2011

1 commit


02 Jun, 2011

3 commits

  • In this case, the SCTP association transmits an ASCONF packet
    including addition of the new IP address and deletion of the old
    address. This patch implements this functionality.
    In this case, the ASCONF chunk is added to the beginning of the
    queue, because the other chunks cannot be transmitted in this state.

    Signed-off-by: Michio Honda
    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Michio Honda
     
  • This patch allows the application to operate Auto-ASCONF on/off
    behavior via setsockopt() and getsockopt().

    Signed-off-by: Michio Honda
    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Michio Honda
     
  • SCTP reconfigure the IP addresses in the association by using
    ASCONF chunks as mentioned in RFC5061. For example, we can
    start to use the newly configured IP address in the existing
    association. This patch implements automatic ASCONF operation
    in the SCTP stack with address events in the host computer,
    which is called auto_asconf.

    Signed-off-by: Michio Honda
    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Michio Honda
     

13 May, 2011

2 commits


28 Apr, 2011

1 commit

  • The ipv6 routing lookup does give us a source address,
    but instead of filling it into the dst, it's stored in
    the flowi. We can use that instead of going through the
    entire source address selection again.
    Also the useless ->dst_saddr member of sctp_pf is removed.
    And sctp_v6_dst_saddr() is removed, instead by introduce
    sctp_v6_to_addr(), which can be reused to cleanup some dup
    code.

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

    Vlad Yasevich
     

22 Apr, 2011

1 commit

  • This patch Implement socket option SCTP_GET_ASSOC_ID_LIST.
    SCTP Socket API Extension:

    8.2.6. Get the Current Identifiers of Associations
    (SCTP_GET_ASSOC_ID_LIST)

    This option gets the current list of SCTP association identifiers of
    the SCTP associations handled by a one-to-many style socket.

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

    Wei Yongjun
     

20 Apr, 2011

2 commits


31 Mar, 2011

1 commit


08 Mar, 2011

1 commit


23 Feb, 2011

1 commit


20 Jan, 2011

1 commit

  • The option name of Delayed SACK Timer should be SCTP_DELAYED_SACK,
    not SCTP_DELAYED_ACK.

    Left SCTP_DELAYED_ACK be concomitant with SCTP_DELAYED_SACK,
    for making compatibility with existing applications.

    Reference:
    8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK)
    (http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-25)

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

    Shan Wei
     

18 Dec, 2010

1 commit


17 Dec, 2010

1 commit


11 Dec, 2010

1 commit

  • SCTP_SET_PEER_PRIMARY_ADDR does not accpet v4mapped address, using
    v4mapped address in SCTP_SET_PEER_PRIMARY_ADDR socket option will
    get -EADDRNOTAVAIL error if v4map is enabled. This patch try to
    fix it by mapping v4mapped address to v4 address if allowed.

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

    Wei Yongjun
     

07 Dec, 2010

1 commit


11 Nov, 2010

1 commit

  • Robin Holt tried to boot a 16TB machine and found some limits were
    reached : sysctl_tcp_mem[2], sysctl_udp_mem[2]

    We can switch infrastructure to use long "instead" of "int", now
    atomic_long_t primitives are available for free.

    Signed-off-by: Eric Dumazet
    Reported-by: Robin Holt
    Reviewed-by: Robin Holt
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Eric Dumazet
     

05 Oct, 2010

1 commit


04 Oct, 2010

2 commits

  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Two user-controlled allocations in SCTP are subsequently dereferenced as
    sockaddr structs, without checking if the dereferenced struct members fall
    beyond the end of the allocated chunk. There doesn't appear to be any
    information leakage here based on how these members are used and
    additional checking, but it's still worth fixing.

    [akpm@linux-foundation.org: remove unfashionable newlines, fix gmail tab->space conversion]
    Signed-off-by: Dan Rosenberg
    Acked-by: Vlad Yasevich
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Dan Rosenberg
     

24 Sep, 2010

1 commit


09 Sep, 2010

1 commit


07 Sep, 2010

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
     

16 May, 2010

1 commit

  • (Dropped the infiniband part, because Tetsuo modified the related code,
    I will send a separate patch for it once this is accepted.)

    This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports which
    allows users to reserve ports for third-party applications.

    The reserved ports will not be used by automatic port assignments
    (e.g. when calling connect() or bind() with port number 0). Explicit
    port allocation behavior is unchanged.

    Signed-off-by: Octavian Purdila
    Signed-off-by: WANG Cong
    Cc: Neil Horman
    Cc: Eric Dumazet
    Cc: Eric W. Biederman
    Signed-off-by: David S. Miller

    Amerigo Wang
     

04 May, 2010

1 commit


03 May, 2010

1 commit


02 May, 2010

1 commit

  • sk_callback_lock rwlock actually protects sk->sk_sleep pointer, so we
    need two atomic operations (and associated dirtying) per incoming
    packet.

    RCU conversion is pretty much needed :

    1) Add a new structure, called "struct socket_wq" to hold all fields
    that will need rcu_read_lock() protection (currently: a
    wait_queue_head_t and a struct fasync_struct pointer).

    [Future patch will add a list anchor for wakeup coalescing]

    2) Attach one of such structure to each "struct socket" created in
    sock_alloc_inode().

    3) Respect RCU grace period when freeing a "struct socket_wq"

    4) Change sk_sleep pointer in "struct sock" by sk_wq, pointer to "struct
    socket_wq"

    5) Change sk_sleep() function to use new sk->sk_wq instead of
    sk->sk_sleep

    6) Change sk_has_sleeper() to wq_has_sleeper() that must be used inside
    a rcu_read_lock() section.

    7) Change all sk_has_sleeper() callers to :
    - Use rcu_read_lock() instead of read_lock(&sk->sk_callback_lock)
    - Use wq_has_sleeper() to eventually wakeup tasks.
    - Use rcu_read_unlock() instead of read_unlock(&sk->sk_callback_lock)

    8) sock_wake_async() is modified to use rcu protection as well.

    9) Exceptions :
    macvtap, drivers/net/tun.c, af_unix use integrated "struct socket_wq"
    instead of dynamically allocated ones. They dont need rcu freeing.

    Some cleanups or followups are probably needed, (possible
    sk_callback_lock conversion to a spinlock for example...).

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet