26 Apr, 2007

40 commits

  • This patch creates the core cfg80211 code along with some sysfs bits.
    This is a stripped down version to allow mac80211 to function, but
    doesn't include any configuration yet except for creating and removing
    virtual interfaces.

    This patch includes the nl80211 header file but it only contains the
    interface types which the cfg80211 interface for creating virtual
    interfaces relies on.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • This patch refactors the wireless Kconfig all over and already
    introduces net/wireless/Kconfig with just the WEXT bit for now,
    the cfg80211 patch will add to that as well.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • This patch adds the linux-wireless mailing list to all appropriate
    entries in the MAINTAINERS file.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     
  • Hint from David Miller .

    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • Signed-off-by: YOSHIFUJI Hideaki

    YOSHIFUJI Hideaki
     
  • Because stats pointer may not be aligned for u64, use memcpy
    to fill u64 values.
    Issue reported by David Miller .

    Signed-off-by: YOSHIFUJI Hideaki

    YOSHIFUJI Hideaki
     
  • This is (mostly) automated change using magic:

    sed -e '/struct sock \*sk/ N' -e '/struct sock \*sk/ N'
    -e '/struct sock \*sk/ N' -e '/struct sock \*sk/ N'
    -e 's|struct sock \*sk,[\n\t ]*struct tcp_sock \*tp\([^{]*\n{\n\)|
    struct sock \*sk\1\tstruct tcp_sock *tp = tcp_sk(sk);\n|g'
    -e 's|struct sock \*sk, struct tcp_sock \*tp|
    struct sock \*sk|g' -e 's|sk, tp\([^-]\)|sk\1|g'

    Fixed four unused variable (tp) warnings that were introduced.

    In addition, manually added newlines after local variables and
    tweaked function arguments positioning.

    $ gcc --version
    gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
    ...
    $ codiff -fV built-in.o.old built-in.o.new
    net/ipv4/route.c:
    rt_cache_flush | +14
    1 function changed, 14 bytes added

    net/ipv4/tcp.c:
    tcp_setsockopt | -5
    tcp_sendpage | -25
    tcp_sendmsg | -16
    3 functions changed, 46 bytes removed

    net/ipv4/tcp_input.c:
    tcp_try_undo_recovery | +3
    tcp_try_undo_dsack | +2
    tcp_mark_head_lost | -12
    tcp_ack | -15
    tcp_event_data_recv | -32
    tcp_rcv_state_process | -10
    tcp_rcv_established | +1
    7 functions changed, 6 bytes added, 69 bytes removed, diff: -63

    net/ipv4/tcp_output.c:
    update_send_head | -9
    tcp_transmit_skb | +19
    tcp_cwnd_validate | +1
    tcp_write_wakeup | -17
    __tcp_push_pending_frames | -25
    tcp_push_one | -8
    tcp_send_fin | -4
    7 functions changed, 20 bytes added, 63 bytes removed, diff: -43

    built-in.o.new:
    18 functions changed, 40 bytes added, 178 bytes removed, diff: -138

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Correct the function name in the comments supplied with
    register_netdev()

    Signed-off-by: Borislav Petkov
    Signed-off-by: David S. Miller

    Borislav Petkov
     
  • Spelling corrections, from "to" to "too".

    Signed-off-by: G. Liakhovetski
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    G. Liakhovetski
     
  • Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Samuel Ortiz
     
  • In af_irda.c, the multiple IRDA_ASSERT() are either hiding bugs, useless, or
    returning the wrong value.
    Let's clean that up.

    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Samuel Ortiz
     
  • This patch removes a cut'n'paste copy of wait_event_interruptible
    from irda_accept.

    Signed-off-by: Samuel Ortiz
    Acked-by: Olaf Kirch
    Signed-off-by: David S. Miller

    Samuel Ortiz
     
  • This patch silences an IRDA_ASSERT in irda_recvmsg_stream, as described in
    http://bugzilla.kernel.org/show_bug.cgi?id=7512 irda_disconnect_indication
    would set sk->sk_err to ECONNRESET, and a subsequent call to recvmsg
    would print an irritating kernel message and return -1.

    When a connected socket is closed by the peer, recvmsg should return 0
    rather than an error. This patch fixes this.

    Signed-off-by: Olaf Kirch
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Olaf Kirch
     
  • This patch cleans up some code in irda_recvmsg_stream, replacing some
    homebrew code with prepare_to_wait/finish_wait, and by making the
    code honor sock_rcvtimeo.

    Signed-off-by: Olaf Kirch
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Olaf Kirch
     
  • It is far too large to be an inline and not in any hot paths.

    Signed-off-by: Andi Kleen
    Signed-off-by: David S. Miller

    Andi Kleen
     
  • The function is quite big and has several call sites and nothing
    to collapse by compiler optimization on inlining.

    Besides it's nicer to read in a in .c file.

    Signed-off-by: Andi Kleen
    Signed-off-by: David S. Miller

    Andi Kleen
     
  • 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
     
  • This is an implementation of TCP Illinois invented by Shao Liu
    at University of Illinois. It is a another variant of Reno which adapts
    the alpha and beta parameters based on RTT. The basic idea is to increase
    window less rapidly as delay approaches the maximum. See the papers
    and talks to get a more complete description.

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

    Stephen Hemminger
     
  • It isn't any faster to test a boolean global variable than do a simple
    check for empty list.

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

    Stephen Hemminger
     
  • pppoe_flush_dev() kicks all sockets bound to a device that is going down.
    In doing so, locks must be taken in the right order consistently (sock lock,
    followed by the pppoe_hash_lock). However, the scan process is based on
    us holding the sock lock. So, when something is found in the scan we must
    release the lock we're holding and grab the sock lock.

    This patch fixes race conditions between this code and pppoe_release(),
    both of which perform similar functions but would naturally prefer to grab
    locks in opposing orders. Both code paths are now going after these locks
    in a consistent manner.

    pppoe_hash_lock protects the contents of the "pppox_sock" objects that reside
    inside the hash. Thus, NULL'ing out the pppoe_dev field should be done
    under the protection of this lock.

    Signed-off-by: Michal Ostrowski
    Signed-off-by: David S. Miller

    Michal Ostrowski
     
  • below you find a patch that fixes a memory leak when a PPPoE socket is
    release()d after it has been connect()ed, but before the PPPIOCGCHAN ioctl
    ever has been called on it.

    This is somewhat of a security problem, too, since PPPoE sockets can be
    created by any user, so any user can easily allocate all the machine's
    RAM to non-swappable address space and thus DoS the system.

    Is there any specific reason for PPPoE sockets being available to any
    unprivileged process, BTW? After all, you need a packet socket for the
    discovery stage anyway, so it's unlikely that any unprivileged process
    will ever need to create a PPPoE socket, no? Allocating all session IDs
    for a known AC is a kind of DoS, too, after all - with Juniper ERXes,
    this is really easy, actually, since they don't ever assign session ids
    above 8000 ...

    Signed-off-by: Florian Zumbiehl
    Acked-by: Michal Ostrowski
    Signed-off-by: David S. Miller

    Florian Zumbiehl
     
  • below you find a patch that (hopefully) fixes a race between an interface
    going down and a connect() to a peer on that interface. Before,
    connect() would determine that an interface is up, then the interface
    could go down and all entries referring to that interface in the
    item_hash_table would be marked as ZOMBIEs and their references to
    the device would be freed, and after that, connect() would put a new
    entry into the hash table referring to the device that meanwhile is
    down already - which also would cause unregister_netdevice() to wait
    until the socket has been release()d.

    This patch does not suffice if we are not allowed to accept connect()s
    referring to a device that we already acked a NETDEV_GOING_DOWN for
    (that is: all references are only guaranteed to be freed after
    NETDEV_DOWN has been acknowledged, not necessarily after the
    NETDEV_GOING_DOWN already). And if we are allowed to, we could avoid
    looking through the hash table upon NETDEV_GOING_DOWN completely and
    only do that once we get the NETDEV_DOWN ...

    mostrows:
    pppoe_flush_dev is called on NETDEV_GOING_DOWN and NETDEV_DOWN to deal with
    this "late connect" issue. Ideally one would hope to notify users at the
    "NETDEV_GOING_DOWN" phase (just to pretend to be nice). However, it is the
    NETDEV_DOWN scan that takes all the responsibility for ensuring nobody is
    hanging around at that time.

    Signed-off-by: Florian Zumbiehl
    Acked-by: Michal Ostrowski
    Signed-off-by: David S. Miller

    Florian Zumbiehl
     
  • below is a patch that just removes dead code/initializers without any
    effect (first access is an assignment) that I stumbled accross while
    reading the source.

    Signed-off-by: Florian Zumbiehl
    Acked-by: Michal Ostrowski
    Signed-off-by: David S. Miller

    Florian Zumbiehl
     
  • Getting warnings becuase skb_store_bits has skb as constant,
    but the function overwrites it. Looks like const was on the
    wrong side.

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

    Stephen Hemminger
     
  • The following is leftover from earlier change in net-2.6.22.

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

    Stephen Hemminger
     
  • Signed-off-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Ralf Baechle
     
  • Add a packet socket option to allow the orig_dev index to be returned
    to userspace when passing traffic through a decapsulated device, such
    as the bonding driver.

    This is very useful for layer 2 traffic being able to report which
    physical device actually received the traffic, instead of having the
    encapsulating device hide that information.

    The new option is called PACKET_ORIGDEV.

    Signed-off-by: Peter P. Waskiewicz Jr.
    Signed-off-by: David S. Miller

    Peter P. Waskiewicz Jr
     
  • Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • This also fixes memory leak in error path.

    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • Add IP(V6)_PMTUDISC_PROBE value for IP(V6)_MTU_DISCOVER. This option forces
    us not to fragment, but does not make use of the kernel path MTU discovery.
    That is, it allows for user-mode MTU probing (or, packetization-layer path
    MTU discovery). This is particularly useful for diagnostic utilities, like
    traceroute/tracepath.

    Signed-off-by: John Heffner
    Signed-off-by: David S. Miller

    John Heffner
     
  • Adds a check in ip6_fragment() mirroring ip_fragment() for packets
    that we can't fragment, and sends an ICMP Packet Too Big message
    in response.

    Signed-off-by: John Heffner
    Signed-off-by: David S. Miller

    John Heffner
     
  • Switch ingress queueing back to use ingress_lock. qdisc_lock_tree now locks
    both the ingress and egress qdiscs on the device. All changes to data that
    might be used on both ingress and egress needs to be protected by using
    qdisc_lock_tree instead of manually taking dev->queue_lock. Additionally
    the qdisc stats_lock needs to be initialized to ingress_lock for ingress
    qdiscs.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Since we're now holding the rtnl during the entire dump operation, we
    can remove qdisc_tree_lock, whose only purpose is to protect dump
    callbacks from concurrent changes to the qdisc tree.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Don't reinitialize the callback mutex the netlink_kernel_create caller
    handed in, it is supposed to already be initialized and could already
    be held by someone.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Since we're now holding the rtnl during the entire dump operation, we can
    remove additional locking for rtnl protected data. This patch does that
    for all simple cases (dev_base_lock for dev_base walking, RCU protection
    for FIB rule dumping).

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Hold rtnl_mutex during the entire netlink dump operation. This allows
    to simplify locking in the dump callbacks, since they can now rely on
    that no concurrent changes happen.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Switch cb_lock to mutex and allow netlink kernel users to override it
    with a subsystem specific mutex for consistent locking in dump callbacks.
    All netlink_dump_start users have been audited not to rely on any
    side-effects of the previously used spinlock.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy