aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-06-18netdevice: Fix promiscuity and allmulti overflowWang Chen
Max of promiscuity and allmulti plus positive @inc can cause overflow. Fox example: when allmulti=0xFFFFFFFF, any caller give dev_set_allmulti() a positive @inc will cause allmulti be off. This is not what we want, though it's rare case. The fix is that only negative @inc will cause allmulti or promiscuity be off and when any caller makes the counters touch the roof, we return error. Change of v2: Change void function dev_set_promiscuity/allmulti to return int. So callers can get the overflow error. Caller's fix will be done later. Change of v3: 1. Since we return error to caller, we don't need to print KERN_ERROR, KERN_WARNING is enough. 2. In dev_set_promiscuity(), if __dev_set_promiscuity() failed, we return at once. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-18ipv6: minor cleanup in net/ipv6/tcp_ipv6.c [RESEND ].Rami Rosen
In net/ipv6/tcp_ipv6.c: - Remove unneeded tcp_v6_send_check() declaration. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17net: Add sk_set_socket() helper.David S. Miller
In order to more easily grep for all things that set sk->sk_socket, add sk_set_socket() helper inline function. Suggested (although only half-seriously) by Evgeniy Polyakov. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17Merge branch 'davem-next' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2008-06-17ax25: Fix std timer socket destroy handling.David S. Miller
Tihomir Heidelberg - 9a4gl, reports: -------------------- I would like to direct you attention to one problem existing in ax.25 kernel since 2.4. If listening socket is closed and its SKB queue is released but those sockets get weird. Those "unAccepted()" sockets should be destroyed in ax25_std_heartbeat_expiry, but it will not happen. And there is also a note about that in ax25_std_timer.c: /* Magic here: If we listen() and a new link dies before it is accepted() it isn't 'dead' so doesn't get removed. */ This issue cause ax25d to stop accepting new connections and I had to restarted ax25d approximately each day and my services were unavailable. Also netstat -n -l shows invalid source and device for those listening sockets. It is strange why ax25d's listening socket get weird because of this issue, but definitely when I solved this bug I do not have problems with ax25d anymore and my ax25d can run for months without problems. -------------------- Actually as far as I can see, this problem is even in releases as far back as 2.2.x as well. It seems senseless to special case this test on TCP_LISTEN state. Anything still stuck in state 0 has no external references and we can just simply kill it off directly. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17netdevice: change net_device->promiscuity/allmulti to unsigned intWang Chen
The comments of dev_set_allmulti/promiscuity() is that "While the count in the device remains above zero...". So negative count is useless. Fix the type of the counter from "int" to "unsigned int". Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17udp: sk_drops handlingEric Dumazet
In commits 33c732c36169d7022ad7d6eb474b0c9be43a2dc1 ([IPV4]: Add raw drops counter) and a92aa318b4b369091fd80433c80e62838db8bc1c ([IPV6]: Add raw drops counter), Wang Chen added raw drops counter for /proc/net/raw & /proc/net/raw6 This patch adds this capability to UDP sockets too (/proc/net/udp & /proc/net/udp6). This means that 'RcvbufErrors' errors found in /proc/net/snmp can be also be examined for each udp socket. # grep Udp: /proc/net/snmp Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors Udp: 23971006 75 899420 16390693 146348 0 # cat /proc/net/udp sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt --- uid timeout inode ref pointer drops 75: 00000000:02CB 00000000:0000 07 00000000:00000000 00:00000000 00000000 --- 0 0 2358 2 ffff81082a538c80 0 111: 00000000:006F 00000000:0000 07 00000000:00000000 00:00000000 00000000 --- 0 0 2286 2 ffff81042dd35c80 146348 In this example, only port 111 (0x006F) was flooded by messages that user program could not read fast enough. 146348 messages were lost. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-18MAINTAINERSJeff Kirsher
Add PJ Waskiewicz to the list of maintainers for Intel 10/100/1000/10GbE adapters. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-18bonding: Allow setting max_bonds to zeroJay Vosburgh
Permit bonding to function rationally if max_bonds is set to zero. This will load the module, but create no master devices (which can be created via sysfs). Requires some change to bond_create_sysfs; currently, the netdev sysfs directory is determined from the first bonding device created, but this is no longer possible. Instead, an interface from net/core is created to create and destroy files in net_class. Based on a patch submitted by Phil Oester <kernel@linuxaces.com>. Modified by Jay Vosburgh to fix the sysfs issue mentioned above and to update the documentation. Signed-off-by: Phil Oester <kernel@linuxace.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-18bonding: Rework / fix multiple gratuitous ARP supportJay Vosburgh
Support for sending multiple gratuitous ARPs during failovers was added by commit: commit 7893b2491a2d5f716540ac5643d78d37a7f6628b Author: Moni Shoua <monis@voltaire.com> Date: Sat May 17 21:10:12 2008 -0700 bonding: Send more than one gratuitous ARP when slave takes over This change modifies that support to remove duplicated code, add support for ARP monitor (the original only supported miimon), clear the grat ARP counter in bond_close (lest a later "ifconfig up" immediately start spewing ARPs), and add documentation for the module parameter. Also updated driver version to 3.3.0. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17bonding: deliver netdev event for fail-over under the active-backup modeOr Gerlitz
under active-backup mode and when there's actual new_active slave, have bond_change_active_slave() call the networking core to deliver NETDEV_BONDING_FAILOVER event such that the fail-over can be notable by code outside of the bonding driver such as the RDMA stack and monitoring tools. As the correct context of locking appropriate for notifier calls is RTNL and nothing else, bond->curr_slave_lock and bond->lock are unlocked and later locked again. This is ensured by the rest of the code to be safe under backup-mode AND when new_active is not NULL. Jay Vosburgh modified the original patch for formatting and fixed a compiler error. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17bonding: bond_change_active_slave() cleanup under active-backupOr Gerlitz
simplified the code of bond_change_active_slave() such that under active-backup mode there's one "if (new_active)" test and the rest of the code only does extra checks on top of it. This removed an unneeded "if (bond->send_grat_arp > 0)" check and avoid calling bond_send_gratuitous_arp when there's no active slave. Jay Vosburgh made minor coding style changes to the orignal patch. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17net/core: add NETDEV_BONDING_FAILOVER eventOr Gerlitz
Add NETDEV_BONDING_FAILOVER event to be used in a successive patch by bonding to announce fail-over for the active-backup mode through the netdev events notifier chain mechanism. Such an event can be of use for the RDMA CM (communication manager) to let native RDMA ULPs (eg NFS-RDMA, iSER) always be aligned with the IP stack, in the sense that they use the same ports/links as the stack does. More usages can be done to allow monitoring tools based on netlink events being aware to bonding fail-over. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17sky2: version 1.22Stephen Hemminger
New version to reflect new hardware support Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17sky2: 88E8057 chip supportStephen Hemminger
Add support for Yukon 2 Ultra 2 chip set (88E8057) based on code in latest version of vendor driver (sk98lin 10.60.2.3). Untested on real hardware. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17sky2: use DEFINE_PCI_DEVICE_TABLEStephen Hemminger
PCI device table can be marked as devinitconst by using macro. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17sky2: chip version printoutStephen Hemminger
Change how chip version is printed so that if an unknown version is detected nothing breaks. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17sky2: phy setup changesStephen Hemminger
Change the setup of the PHY registers on some chip ids. These changes make the latest sky2 driver follow the vendor driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17ibm_emac: Remove the ibm_emac driverJosh Boyer
The arch/ppc sub-tree has been removed in the powerpc git tree. The old ibm_emac driver is no longer used by anything as a result of this. This removes it, leaving the ibm_newemac driver as the proper driver to use for PowerPC boards with the EMAC hardware. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-17Merge branch 'for-2.6.27' of git://git.marvell.com/mv643xx_eth into ↵Jeff Garzik
upstream-next
2008-06-17rose: improving AX25 routing frames via ROSE networkBernard Pidoux
ROSE network is organized through nodes connected via hamradio or Internet. AX25 packet radio frames sent to a remote ROSE address destination are routed through these nodes. Without the present patch, automatic routing mechanism did not work optimally due to an improper parameter checking. rose_get_neigh() function is called either by rose_connect() or by rose_route_frame(). In the case of a call from rose_connect(), f0 timer is checked to find if a connection is already pending. In that case it returns the address of the neighbour, or returns a NULL otherwise. When called by rose_route_frame() the purpose was to route a packet AX25 frame through an adjacent node given a destination rose address. However, in that case, t0 timer checked does not indicate if the adjacent node is actually connected even if the timer is not null. Thus, for each frame sent, the function often tried to start a new connexion even if the adjacent node was already connected. The patch adds a "new" parameter that is true when the function is called by rose route_frame(). This instructs rose_get_neigh() to check node parameter "restarted". If restarted is true it means that the route to the destination address is opened via a neighbour node already connected. If "restarted" is false the function returns a NULL. In that case the calling function will initiate a new connection as before. This results in a fast routing of frames, from nodes to nodes, until destination is reached, as originaly specified by ROSE protocole. Signed-off-by: Bernard Pidoux <f6bvp@amsat.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17atm: [fore200e] convert to use request_firmware()Chas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17atm: [he] remove #ifdef clutterChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17atm: [iphase] 64-bit cleanupAlan Cox
This fixes the most obvious 64-bit problems, but it is still very very broken in other aspects. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17atm: use const where reasonableMitchell Blank Jr
From: Mitchell Blank Jr <mitch@sfgoth.com> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17atm: [suni] add support for setting loopback and framing modesChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17atm: [iphase] move struct suni_priv to suni.hJorge Boncompte [DTI2]
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17bridge: fix IPV6=n buildRandy Dunlap
Fix bridge netfilter code so that it uses CONFIG_IPV6 as needed: net/built-in.o: In function `ebt_filter_ip6': ebt_ip6.c:(.text+0x87c37): undefined reference to `ipv6_skip_exthdr' net/built-in.o: In function `ebt_log_packet': ebt_log.c:(.text+0x88dee): undefined reference to `ipv6_skip_exthdr' make[1]: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17bridge: make bridge address settings stickyStephen Hemminger
Normally, the bridge just chooses the smallest mac address as the bridge id and mac address of bridge device. But if the administrator has explictly set the interface address then don't change it. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17bridge: handle process all link-local framesStephen Hemminger
Any frame addressed to link-local addresses should be processed by local receive path. The earlier code would process them only if STP was enabled. Since there are other frames like LACP for bonding, we should always process them. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17sctp: fix error path in sctp_proc_initPavel Emelyanov
After the sctp_remaddr_proc_init failed, the proper rollback is not the sctp_remaddr_proc_exit, but the sctp_assocs_proc_exit. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17netrom: Kill spurious NULL'ing of sk->sk_socket.David S. Miller
In nr_release(), one code path calls sock_orphan() which will NULL out sk->sk_socket already. In the other case, handling states other than NR_STATE_{0,1,2,3}, seems to not be possible other than due to bugs. Even for an uninitialized nr->state value, that would be zero or NR_STATE_0. It might be wise to stick a WARN_ON() here. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17x25: Use sock_orphan() instead of open-coded (and buggy) variant.David S. Miller
It doesn't grab the sk_callback_lock, it doesn't NULL out the sk->sk_sleep waitqueue pointer, etc. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17econet: Use sock_orphan() instead of open-coded (and buggy) variant.David S. Miller
It doesn't grab the sk_callback_lock, it doesn't NULL out the sk->sk_sleep waitqueue pointer, etc. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17x25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.David S. Miller
This is the x25 variant of changeset 9375cb8a1232d2a15fe34bec4d3474872e02faec ("ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.") Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17rose: Use sock_graft() and remove bogus sk_socket and sk_sleep init.David S. Miller
This is the rose variant of changeset 9375cb8a1232d2a15fe34bec4d3474872e02faec ("ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.") Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17netrom: Use sock_graft() and remove bogus sk_socket and sk_sleep init.David S. Miller
This is the netrom variant of changeset 9375cb8a1232d2a15fe34bec4d3474872e02faec ("ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.") Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.David S. Miller
The way that listening sockets work in ax25 is that the packet input code path creates new socks via ax25_make_new() and attaches them to the incoming SKB. This SKB gets queued up into the listening socket's receive queue. When accept()'d the sock gets hooked up to the real parent socket. Alternatively, if the listening socket is closed and released, any unborn socks stuff up in the receive queue get released. So during this time period these sockets are unreachable in any other way, so no wakeup events nor references to their ->sk_socket and ->sk_sleep members can occur. And even if they do, all such paths have to make NULL checks. So do not deceptively initialize them in ax25_make_new() to the values in the listening socket. Leave them at NULL. Finally, use sock_graft() in ax25_accept(). Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17llc: Use sock_graft() instead of by-hand version.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17net: Kill SOCK_SLEEP_PRE and SOCK_SLEEP_POST, no users.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17decnet: Remove SOCK_SLEEP_{PRE,POST} usage.David S. Miller
Just expand the wait sequence. And as a nice side-effect the timeout is respected now. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-17sctp: Kill SCTP_SOCK_SLEEP_{PRE,POST}, unused.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-16Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/rt2x00/Kconfig drivers/net/wireless/rt2x00/rt2x00usb.c net/sctp/protocol.c
2008-06-16atm: [he] send idle cells instead of unassigned when in SDH modeChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-16atm: [he] limit queries to the device's register spaceRobert T. Johnson
From: "Robert T. Johnson" <rtjohnso@eecs.berkeley.edu> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
2008-06-16atm: [br2864] fix routed vcmux supportEric Kinzie
From: Eric Kinzie <ekinzie@cmf.nrl.navy.mil> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-16atm: [he] only support suni driver on multimode interfacesChas Williams
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-16atm: [iphase] doesn't call phy->start due to a bogus #ifndefJorge Boncompte [DTI2]
This causes the suni driver to oops if you try to use sonetdiag to get the statistics. Also add the corresponding phy->stop call to fix another oops if you try to remove the module. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-16atm: [iphase] set drvdata before enabling interruptsJorge Boncompte [DTI2]
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-16atm: [br2684] Fix oops due to skb->dev being NULLJorge Boncompte [DTI2]
It happens that if a packet arrives in a VC between the call to open it on the hardware and the call to change the backend to br2684, br2684_regvcc processes the packet and oopses dereferencing skb->dev because it is NULL before the call to br2684_push(). Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>