13 Mar, 2013

2 commits

  • sctp_assoc_lookup_tsn() function searchs which transport a certain TSN
    was sent on, if not found in the active_path transport, then go search
    all the other transports in the peer's transport_addr_list, however, we
    should continue to the next entry rather than break the loop when meet
    the active_path transport.

    Signed-off-by: Xufeng Zhang
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Xufeng Zhang
     
  • When SCTP is done processing a duplicate cookie chunk, it tries
    to delete a newly created association. For that, it has to set
    the right association for the side-effect processing to work.
    However, when it uses the SCTP_CMD_NEW_ASOC command, that performs
    more work then really needed (like hashing the associationa and
    assigning it an id) and there is no point to do that only to
    delete the association as a next step. In fact, it also creates
    an impossible condition where an association may be found by
    the getsockopt() call, and that association is empty. This
    causes a crash in some sctp getsockopts.

    The solution is rather simple. We simply use SCTP_CMD_SET_ASOC
    command that doesn't have all the overhead and does exactly
    what we need.

    Reported-by: Karl Heiss
    Tested-by: Karl Heiss
    CC: Neil Horman
    Signed-off-by: Vlad Yasevich
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

06 Mar, 2013

1 commit

  • Pull networking fixes from David Miller:
    "A moderately sized pile of fixes, some specifically for merge window
    introduced regressions although others are for longer standing items
    and have been queued up for -stable.

    I'm kind of tired of all the RDS protocol bugs over the years, to be
    honest, it's way out of proportion to the number of people who
    actually use it.

    1) Fix missing range initialization in netfilter IPSET, from Jozsef
    Kadlecsik.

    2) ieee80211_local->tim_lock needs to use BH disabling, from Johannes
    Berg.

    3) Fix DMA syncing in SFC driver, from Ben Hutchings.

    4) Fix regression in BOND device MAC address setting, from Jiri
    Pirko.

    5) Missing usb_free_urb in ISDN Hisax driver, from Marina Makienko.

    6) Fix UDP checksumming in bnx2x driver for 57710 and 57711 chips,
    fix from Dmitry Kravkov.

    7) Missing cfgspace_lock initialization in BCMA driver.

    8) Validate parameter size for SCTP assoc stats getsockopt(), from
    Guenter Roeck.

    9) Fix SCTP association hangs, from Lee A Roberts.

    10) Fix jumbo frame handling in r8169, from Francois Romieu.

    11) Fix phy_device memory leak, from Petr Malat.

    12) Omit trailing FCS from frames received in BGMAC driver, from Hauke
    Mehrtens.

    13) Missing socket refcount release in L2TP, from Guillaume Nault.

    14) sctp_endpoint_init should respect passed in gfp_t, rather than use
    GFP_KERNEL unconditionally. From Dan Carpenter.

    15) Add AISX AX88179 USB driver, from Freddy Xin.

    16) Remove MAINTAINERS entries for drivers deleted during the merge
    window, from Cesar Eduardo Barros.

    17) RDS protocol can try to allocate huge amounts of memory, check
    that the user's request length makes sense, from Cong Wang.

    18) SCTP should use the provided KMALLOC_MAX_SIZE instead of it's own,
    bogus, definition. From Cong Wang.

    19) Fix deadlocks in FEC driver by moving TX reclaim into NAPI poll,
    from Frank Li. Also, fix a build error introduced in the merge
    window.

    20) Fix bogus purging of default routes in ipv6, from Lorenzo Colitti.

    21) Don't double count RTT measurements when we leave the TCP receive
    fast path, from Neal Cardwell."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
    tcp: fix double-counted receiver RTT when leaving receiver fast path
    CAIF: fix sparse warning for caif_usb
    rds: simplify a warning message
    net: fec: fix build error in no MXC platform
    net: ipv6: Don't purge default router if accept_ra=2
    net: fec: put tx to napi poll function to fix dead lock
    sctp: use KMALLOC_MAX_SIZE instead of its own MAX_KMALLOC_SIZE
    rds: limit the size allocated by rds_message_alloc()
    MAINTAINERS: remove eexpress
    MAINTAINERS: remove drivers/net/wan/cycx*
    MAINTAINERS: remove 3c505
    caif_dev: fix sparse warnings for caif_flow_cb
    ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
    sctp: use the passed in gfp flags instead GFP_KERNEL
    ipv[4|6]: correct dropwatch false positive in local_deliver_finish
    l2tp: Restore socket refcount when sendmsg succeeds
    net/phy: micrel: Disable asymmetric pause for KSZ9021
    bgmac: omit the fcs
    phy: Fix phy_device_free memory leak
    bnx2x: Fix KR2 work-around condition
    ...

    Linus Torvalds
     

05 Mar, 2013

1 commit


02 Mar, 2013

1 commit


01 Mar, 2013

4 commits

  • In sctp_ulpq_tail_data(), use return values 0,1 to indicate whether
    a complete event (with MSG_EOR set) was delivered. A return value
    of -ENOMEM continues to indicate an out-of-memory condition was
    encountered.

    In sctp_ulpq_retrieve_partial() and sctp_ulpq_retrieve_first(),
    correct message reassembly logic for SCTP partial delivery.
    Change logic to ensure that as much data as possible is sent
    with the initial partial delivery and that following partial
    deliveries contain all available data.

    In sctp_ulpq_partial_delivery(), attempt partial delivery only
    if the data on the head of the reassembly queue is at or before
    the cumulative TSN ACK point.

    In sctp_ulpq_renege(), use the modified return values from
    sctp_ulpq_tail_data() to choose whether to attempt partial
    delivery or to attempt to drain the reassembly queue as a
    means to reduce memory pressure. Remove call to
    sctp_tsnmap_mark(), as this is handled correctly in call to
    sctp_ulpq_tail_data().

    Signed-off-by: Lee A. Roberts
    Acked-by: Vlad Yasevich
    Acked-by: Neil Horman

    Lee A. Roberts
     
  • In sctp_ulpq_renege_list(), events being reneged from the
    ordering queue may correspond to multiple TSNs. Identify
    all affected packets; sum freed space and renege from the
    tsnmap.

    Signed-off-by: Lee A. Roberts
    Acked-by: Vlad Yasevich
    Acked-by: Neil Horman

    Lee A. Roberts
     
  • In sctp_ulpq_renege_list(), do not renege packets below the
    cumulative TSN ACK point.

    Signed-off-by: Lee A. Roberts
    Acked-by: Vlad Yasevich
    Acked-by: Neil Horman

    Lee A. Roberts
     
  • In sctp_tsnmap_mark(), correct off-by-one error when calculating
    size value for sctp_tsnmap_grow().

    In sctp_tsnmap_grow(), correct off-by-one error when copying
    and resizing the tsnmap. If max_tsn_seen is in the LSB of the
    word, this bit can be lost, causing the corresponding packet
    to be transmitted again and to be entered as a duplicate into
    the SCTP reassembly/ordering queues. Change parameter name
    from "gap" (zero-based index) to "size" (one-based) to enhance
    code readability.

    Signed-off-by: Lee A. Roberts
    Acked-by: Vlad Yasevich
    Acked-by: Neil Horman

    Lee A. Roberts
     

28 Feb, 2013

3 commits

  • I'm not sure why, but the hlist for each entry iterators were conceived

    list_for_each_entry(pos, head, member)

    The hlist ones were greedy and wanted an extra parameter:

    hlist_for_each_entry(tpos, pos, head, member)

    Why did they need an extra pos parameter? I'm not quite sure. Not only
    they don't really need it, it also prevents the iterator from looking
    exactly like the list iterator, which is unfortunate.

    Besides the semantic patch, there was some manual work required:

    - Fix up the actual hlist iterators in linux/list.h
    - Fix up the declaration of other iterators based on the hlist ones.
    - A very small amount of places were using the 'node' parameter, this
    was modified to use 'obj->member' instead.
    - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
    properly, so those had to be fixed up manually.

    The semantic patch which is mostly the work of Peter Senna Tschudin is here:

    @@
    iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

    type T;
    expression a,c,d,e;
    identifier b;
    statement S;
    @@

    -T b;

    [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
    [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
    [akpm@linux-foundation.org: checkpatch fixes]
    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foudnation.org: redo intrusive kvm changes]
    Tested-by: Peter Senna Tschudin
    Acked-by: Paul E. McKenney
    Signed-off-by: Sasha Levin
    Cc: Wu Fengguang
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     
  • Convert to the much saner new idr interface.

    Signed-off-by: Tejun Heo
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Cc: Sridhar Samudrala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Building sctp may fail with:

    In function ‘copy_from_user’,
    inlined from ‘sctp_getsockopt_assoc_stats’ at
    net/sctp/socket.c:5656:20:
    arch/x86/include/asm/uaccess_32.h:211:26: error: call to
    ‘copy_from_user_overflow’ declared with attribute error: copy_from_user()
    buffer size is not provably correct

    if built with W=1 due to a missing parameter size validation
    before the call to copy_from_user.

    Signed-off-by: Guenter Roeck
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Guenter Roeck
     

22 Feb, 2013

1 commit

  • Pull trivial tree from Jiri Kosina:
    "Assorted tiny fixes queued in trivial tree"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (22 commits)
    DocBook: update EXPORT_SYMBOL entry to point at export.h
    Documentation: update top level 00-INDEX file with new additions
    ARM: at91/ide: remove unsused at91-ide Kconfig entry
    percpu_counter.h: comment code for better readability
    x86, efi: fix comment typo in head_32.S
    IB: cxgb3: delay freeing mem untill entirely done with it
    net: mvneta: remove unneeded version.h include
    time: x86: report_lost_ticks doesn't exist any more
    pcmcia: avoid static analysis complaint about use-after-free
    fs/jfs: Fix typo in comment : 'how may' -> 'how many'
    of: add missing documentation for of_platform_populate()
    btrfs: remove unnecessary cur_trans set before goto loop in join_transaction
    sound: soc: Fix typo in sound/codecs
    treewide: Fix typo in various drivers
    btrfs: fix comment typos
    Update ibmvscsi module name in Kconfig.
    powerpc: fix typo (utilties -> utilities)
    of: fix spelling mistake in comment
    h8300: Fix home page URL in h8300/README
    xtensa: Fix home page URL in Kconfig
    ...

    Linus Torvalds
     

19 Feb, 2013

3 commits

  • Pull in 'net' to take in the bug fixes that didn't make it into
    3.8-final.

    Also, deal with the semantic conflict of the change made to
    net/ipv6/xfrm6_policy.c A missing rt6->n neighbour release
    was added to 'net', but in 'net-next' we no longer cache the
    neighbour entries in the ipv6 routes so that change is not
    appropriate there.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • proc_net_remove is only used to remove proc entries
    that under /proc/net,it's not a general function for
    removing proc entries of netns. if we want to remove
    some proc entries which under /proc/net/stat/, we still
    need to call remove_proc_entry.

    this patch use remove_proc_entry to replace proc_net_remove.
    we can remove proc_net_remove after this patch.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • Right now, some modules such as bonding use proc_create
    to create proc entries under /proc/net/, and other modules
    such as ipv4 use proc_net_fops_create.

    It looks a little chaos.this patch changes all of
    proc_net_fops_create to proc_create. we can remove
    proc_net_fops_create after this patch.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     

14 Feb, 2013

4 commits

  • In order to avoid any future surprises of kernel panics due to jprobes
    function mismatches (as e.g. fixed in 4cb9d6eaf85ecd: sctp: jsctp_sf_eat_sack:
    fix jprobes function signature mismatch), we should check both function
    types during build and scream loudly if they do not match. __same_type
    resolves to __builtin_types_compatible_p, which is 1 in case both types
    are the same and 0 otherwise, qualifiers are ignored. Tested by myself.

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

    Daniel Borkmann
     
  • The function jsctp_sf_eat_sack can be made static, no need to extend
    its visibility.

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

    Daniel Borkmann
     
  • 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
     
  • We walk through the bind address list and try to get the best source
    address for a given destination. However, currently, we take the
    'continue' path of the loop when an entry is invalid (!laddr->valid)
    *and* the entry state does not equal SCTP_ADDR_SRC (laddr->state !=
    SCTP_ADDR_SRC).

    Thus, still, invalid entries with SCTP_ADDR_SRC might not 'continue'
    as well as valid entries with SCTP_ADDR_{NEW, SRC, DEL}, with a possible
    false baddr and matchlen as a result, causing in worst case dst route
    to be false or possibly NULL.

    This test should actually be a '||' instead of '&&'. But lets fix it
    and make this a bit easier to read by having the condition the same way
    as similarly done in sctp_v4_get_dst.

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

    Daniel Borkmann
     

13 Feb, 2013

1 commit

  • Vlad says: The whole multiple cookie keys code is completely unused
    and has been all this time. Noone uses anything other then the
    secret_key[0] since there is no changeover support anywhere.

    Thus, for now clean up its left-over fragments.

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

    Daniel Borkmann
     

09 Feb, 2013

4 commits

  • Synchronize with 'net' in order to sort out some l2tp, wireless, and
    ipv6 GRE fixes that will be built on top of in 'net-next'.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • In sctp_auth_make_key_vector, we allocate a temporary sctp_auth_bytes
    structure with kmalloc instead of the sctp_auth_create_key allocator.
    Change this to sctp_auth_create_key as it is the case everywhere else,
    so that we also can properly free it via sctp_auth_key_put. This makes
    it easier for future code changes in the structure and allocator itself,
    since a single API is consistently used for this purpose. Also, by
    using sctp_auth_create_key we're doing sanity checks over the arguments.

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

    Daniel Borkmann
     
  • On sctp_endpoint_destroy, previously used sensitive keying material
    should be zeroed out before the memory is returned, as we already do
    with e.g. auth keys when released.

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

    Daniel Borkmann
     
  • In sctp_setsockopt_auth_key, we create a temporary copy of the user
    passed shared auth key for the endpoint or association and after
    internal setup, we free it right away. Since it's sensitive data, we
    should zero out the key before returning the memory back to the
    allocator. Thus, use kzfree instead of kfree, just as we do in
    sctp_auth_key_put().

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

    Daniel Borkmann
     

08 Feb, 2013

2 commits


05 Feb, 2013

2 commits

  • As in del_timer() there has already placed a timer_pending() function
    to check whether the timer to be deleted is pending or not, it's
    unnecessary to check timer pending state again before del_timer() is
    called.

    Signed-off-by: Ying Xue
    Cc: Eric Dumazet
    Signed-off-by: David S. Miller

    Ying Xue
     
  • It seems due to RCU usage, i.e. within SCTP's address binding list,
    a, say, ``behavioral change'' was introduced which does actually
    not conform to the RFC anymore. In particular consider the following
    (fictional) scenario to demonstrate this:

    do:
    Two SOCK_SEQPACKET-style sockets are opened (S1, S2)
    S1 is bound to 127.0.0.1, port 1024 [server]
    S2 is bound to 127.0.0.1, port 1025 [client]
    listen(2) is invoked on S1
    From S2 we call one sendmsg(2) with msg.msg_name and
    msg.msg_namelen parameters set to the server's
    address
    S1, S2 are closed
    goto do

    The first pass of this loop passes successful, while the second round
    fails during binding of S1 (address still in use). What is happening?
    In the first round, the initial handshake is being done, and, at the
    time close(2) is called on S1, a non-graceful shutdown is performed via
    ABORT since in S1's receive queue an unprocessed packet is present,
    thus stating an error condition. This can be considered as a correct
    behavior.

    During close also all bound addresses are freed, thus nothing *must*
    be active anymore. In reference to RFC2960:

    After checking the Verification Tag, the receiving endpoint shall
    remove the association from its record, and shall report the
    termination to its upper layer. (9.1 Abort of an Association)

    Also, no half-open states are supported, thus after an ungraceful
    shutdown, we leave nothing behind. However, this seems not to be
    happening though. In a real-world scenario, this is exactly where
    it breaks the lksctp-tools functional test suite, *for instance*:

    ./test_sockopt
    test_sockopt.c 1 PASS : getsockopt(SCTP_STATUS) on a socket with no assoc
    test_sockopt.c 2 PASS : getsockopt(SCTP_STATUS)
    test_sockopt.c 3 PASS : getsockopt(SCTP_STATUS) with invalid associd
    test_sockopt.c 4 PASS : getsockopt(SCTP_STATUS) with NULL associd
    test_sockopt.c 5 BROK : bind: Address already in use

    The underlying problem is that sctp_endpoint_destroy() hasn't been
    triggered yet while the next bind attempt is being done. It will be
    triggered eventually (but too late) by sctp_transport_destroy_rcu()
    after one RCU grace period:

    sctp_transport_destroy()
    sctp_transport_destroy_rcu() ----.
    sctp_association_put() [*] sctp_packet_free()
    sctp_association_destroy() [...]
    sctp_endpoint_put() skb->destructor
    sctp_endpoint_destroy() sctp_wfree()
    sctp_bind_addr_free() sctp_association_put() [*]

    Thus, we move out the condition with sctp_association_put() as well as
    the sctp_packet_free() invocation and the issue can be solved. We also
    better free the SCTP chunks first before putting the ref of the association.

    With this patch, the example above (which simulates a similar scenario
    as in the implementation of this test case) and therefore also the test
    suite run successfully through. Tested by myself.

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

    Daniel Borkmann
     

30 Jan, 2013

1 commit


29 Jan, 2013

1 commit


28 Jan, 2013

2 commits

  • Per-net sysctl table needs to be explicitly freed at
    net exit. Otherwise we see the following with kmemleak:

    unreferenced object 0xffff880402d08000 (size 2048):
    comm "chrome_sandbox", pid 18437, jiffies 4310887172 (age 9097.630s)
    hex dump (first 32 bytes):
    b2 68 89 81 ff ff ff ff 20 04 04 f8 01 88 ff ff .h...... .......
    04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] kmemleak_alloc+0x21/0x3e
    [] slab_post_alloc_hook+0x28/0x2a
    [] __kmalloc_track_caller+0xf1/0x104
    [] kmemdup+0x1b/0x30
    [] sctp_sysctl_net_register+0x1f/0x72
    [] sctp_net_init+0x100/0x39f
    [] ops_init+0xc6/0xf5
    [] setup_net+0x4c/0xd0
    [] copy_net_ns+0x6d/0xd6
    [] create_new_namespaces+0xd7/0x147
    [] copy_namespaces+0x63/0x99
    [] copy_process+0xa65/0x1233
    [] do_fork+0x10b/0x271
    [] sys_clone+0x23/0x25
    [] stub_clone+0x13/0x20
    [] 0xffffffffffffffff

    I fixed the spelling of sysctl_header so the code actually
    compiles. -- EWB.

    Reported-by: Martin Mokrejs
    Signed-off-by: Vlad Yasevich
    Acked-by: Neil Horman
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • While sctp handling a duplicate COOKIE-ECHO and the action is
    'Association restart', sctp_sf_do_dupcook_a() will processing
    the unexpected COOKIE-ECHO for peer restart, but it does not set
    the association state to SCTP_STATE_ESTABLISHED, so the association
    could stuck in SCTP_STATE_SHUTDOWN_PENDING state forever.
    This violates the sctp specification:
    RFC 4960 5.2.4. Handle a COOKIE ECHO when a TCB Exists
    Action
    A) In this case, the peer may have restarted. .....
    After this, the endpoint shall enter the ESTABLISHED state.

    To resolve this problem, adding a SCTP_CMD_NEW_STATE cmd to the
    command list before SCTP_CMD_REPLY cmd, this will set the restart
    association to SCTP_STATE_ESTABLISHED state properly and also avoid
    I-bit being set in the DATA chunk header when COOKIE_ACK is bundled
    with DATA chunks.

    Signed-off-by: Xufeng Zhang
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Xufeng Zhang
     

18 Jan, 2013

1 commit

  • Jamie Parsons reported a problem recently, in which the re-initalization of an
    association (The duplicate init case), resulted in a loss of receive window
    space. He tracked down the root cause to sctp_outq_teardown, which discarded
    all the data on an outq during a re-initalization of the corresponding
    association, but never reset the outq->outstanding_data field to zero. I wrote,
    and he tested this fix, which does a proper full re-initalization of the outq,
    fixing this problem, and hopefully future proofing us from simmilar issues down
    the road.

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

    Neil Horman
     

16 Jan, 2013

1 commit


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
     

03 Jan, 2013

1 commit


29 Dec, 2012

1 commit


16 Dec, 2012

2 commits

  • Commit 24cb81a6a (sctp: Push struct net down into all of the
    state machine functions) introduced the net structure into all
    state machine functions, but jsctp_sf_eat_sack was not updated,
    hence when SCTP association probing is enabled in the kernel,
    any simple SCTP client/server program from userspace will panic
    the kernel.

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

    Daniel Borkmann
     
  • 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