aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2010-07-08Bluetooth: Check L2CAP pending status before sending connect requestAndrei Emeltchenko1-3/+11
Due to race condition in L2CAP state machine L2CAP Connection Request may be sent twice for SDP with the same source channel id. Problems reported connecting to Apple products, some carkit, Blackberry phones. ... 2010-06-07 21:18:03.651031 < ACL data: handle 1 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 1 scid 0x0040 2010-06-07 21:18:03.653473 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 1 packets 1 2010-06-07 21:18:03.653808 > HCI Event: Auth Complete (0x06) plen 3 status 0x00 handle 1 2010-06-07 21:18:03.653869 < ACL data: handle 1 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 1 scid 0x0040 ... Patch uses L2CAP_CONF_CONNECT_PEND flag to mark that L2CAP Connection Request has been sent already. Modified version of patch from Ville Tervo. Signed-off-by: Andrei Emeltchenko <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-08mac80211: remove wep dependencyJohn W. Linville7-21/+30
The current mac80211 code assumes that WEP is always available. If WEP fails to initialize, ieee80211_register_hw will always fail. In some cases (e.g. FIPS certification), the cryptography used by WEP is unavailable. However, in such cases there is no good reason why CCMP encryption (or even no link level encryption) cannot be used. So, this patch removes mac80211's assumption that WEP (and TKIP) will always be available for use. Signed-off-by: John W. Linville <[email protected]>
2010-07-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds7-22/+71
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits) NET: SB1250: Initialize .owner vxge: show startup message with KERN_INFO ll_temac: Fix missing iounmaps bridge: Clear IPCB before possible entry into IP stack bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined net/ne: fix memory leak in ne_drv_probe() xfrm: fix xfrm by MARK logic virtio_net: fix oom handling on tx virtio_net: do not reschedule rx refill forever s2io: resolve statistics issues linux/net.h: fix kernel-doc warnings net: decreasing real_num_tx_queues needs to flush qdisc sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock qlge: fix a eeh handler to not add a pending timer qlge: Replacing add_timer() to mod_timer() usbnet: Set parent device early for netdev_printk() net: Revert "rndis_host: Poll status channel before control channel" netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h ...
2010-07-07Merge branch 'master' of ↵David S. Miller10-24/+76
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2010-07-07net/ipv4/ip_output.c: Removal of unused variable in ip_fragment()George Kadianakis1-2/+1
Removal of unused integer variable in ip_fragment(). Signed-off-by: George Kadianakis <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-07net: fix 64 bit counters on 32 bit archesEric Dumazet6-18/+27
There is a small possibility that a reader gets incorrect values on 32 bit arches. SNMP applications could catch incorrect counters when a 32bit high part is changed by another stats consumer/provider. One way to solve this is to add a rtnl_link_stats64 param to all ndo_get_stats64() methods, and also add such a parameter to dev_get_stats(). Rule is that we are not allowed to use dev->stats64 as a temporary storage for 64bit stats, but a caller provided area (usually on stack) Old drivers (only providing get_stats() method) need no changes. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-07bridge: Clear IPCB before possible entry into IP stackHerbert Xu1-0/+3
The bridge protocol lives dangerously by having incestuous relations with the IP stack. In this instance an abomination has been created where a bogus IPCB area from a bridged packet leads to a crash in the IP stack because it's interpreted as IP options. This patch papers over the problem by clearing the IPCB area in that particular spot. To fix this properly we'd also need to parse any IP options if present but I'm way too lazy for that. Signed-off-by: Herbert Xu <[email protected]> Cheers, Signed-off-by: David S. Miller <[email protected]>
2010-07-07NET: nl80211, fix lock imbalance and netdev referencingJiri Slaby1-1/+1
Stanse found that nl80211_set_wiphy imporperly handles a lock and netdev reference and contains unreachable code. It is because there return statement isntead of assignment to result variable. Fix that. Signed-off-by: Jiri Slaby <[email protected]> Cc: Johannes Berg <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Jouni Malinen <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
2010-07-06sunrpc: make the cache cleaner workqueue deferrableArtem Bityutskiy2-1/+7
This patch makes the cache_cleaner workqueue deferrable, to prevent unnecessary system wake-ups, which is very important for embedded battery-powered devices. do_cache_clean() is called every 30 seconds at the moment, and often makes the system wake up from its power-save sleep state. With this change, when the workqueue uses a deferrable timer, the do_cache_clean() invocation will be delayed and combined with the closest "real" wake-up. This improves the power consumption situation. Note, I tried to create a DECLARE_DELAYED_WORK_DEFERRABLE() helper macro, similar to DECLARE_DELAYED_WORK(), but failed because of the way the timer wheel core stores the deferrable flag (it is the LSBit in the time->base pointer). My attempt to define a static variable with this bit set ended up with the "initializer element is not constant" error. Thus, I have to use run-time initialization, so I created a new cache_initialize() function which is called once when sunrpc is being initialized. Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2010-07-05bridge br_multicast: BUG: unable to handle kernel NULL pointer dereferenceHerbert Xu1-9/+12
On Tue, Jul 06, 2010 at 08:48:35AM +0800, Herbert Xu wrote: > > bridge: Restore NULL check in br_mdb_ip_get Resend with proper attribution. bridge: Restore NULL check in br_mdb_ip_get Somewhere along the line the NULL check in br_mdb_ip_get went AWOL, causing crashes when we receive an IGMP packet with no multicast table allocated. This patch restores it and ensures all br_mdb_*_get functions use it. Reported-by: Frank Arnold <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Thanks, Signed-off-by: David S. Miller <[email protected]>
2010-07-05ipv4: use skb_dst_copy() in ip_copy_metadata()Eric Dumazet1-1/+1
Avoid touching dst refcount in ip_fragment(). Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-05ipvs: Kconfig cleanupMichal Marek1-4/+1
IP_VS_PROTO_AH_ESP should be set iff either of IP_VS_PROTO_{AH,ESP} is selected. Express this with standard kconfig syntax. Signed-off-by: Michal Marek <[email protected]> Acked-by: Simon Horman <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2010-07-05netfilter: ipt_REJECT: avoid touching dst refEric Dumazet1-1/+1
We can avoid a pair of atomic ops in ipt_REJECT send_reset() Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2010-07-05netfilter: ipt_REJECT: postpone the checksum calculation.Changli Gao1-5/+5
postpone the checksum calculation, then if the output NIC supports checksum offloading, we can utlize it. And though the output NIC doesn't support checksum offloading, but we'll mangle this packet, this can free us from updating the checksum, as the checksum calculation occurs later. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2010-07-05netfilter: nf_conntrack_reasm: add fast path for in-order fragmentsChangli Gao1-0/+9
As the fragments are sent in order in most of OSes, such as Windows, Darwin and FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue. In the fast path, we check if the skb at the end of the inet_frag_queue is the prev we expect. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2010-07-04xfrm: fix xfrm by MARK logicPeter Kosyh2-0/+4
While using xfrm by MARK feature in 2.6.34 - 2.6.35 kernels, the mark is always cleared in flowi structure via memset in _decode_session4 (net/ipv4/xfrm4_policy.c), so the policy lookup fails. IPv6 code is affected by this bug too. Signed-off-by: Peter Kosyh <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-04netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functionsJoe Perches1-0/+62
Reduces an x86 defconfig text and data ~2k. text is smaller, data is larger. $ size vmlinux* text data bss dec hex filename 7198862 720112 1366288 9285262 8dae8e vmlinux 7205273 716016 1366288 9287577 8db799 vmlinux.device_h Uses %pV and struct va_format Format arguments are verified before printk Signed-off-by: Joe Perches <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-02Merge branch 'master' of ↵David S. Miller15-111/+243
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
2010-07-02Merge branch 'master' of ↵David S. Miller1-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
2010-07-02net: decreasing real_num_tx_queues needs to flush qdiscJohn Fastabend1-0/+18
Reducing real_num_queues needs to flush the qdisc otherwise skbs with queue_mappings greater then real_num_tx_queues can be sent to the underlying driver. The flow for this is, dev_queue_xmit() dev_pick_tx() skb_tx_hash() => hash using real_num_tx_queues skb_set_queue_mapping() ... qdisc_enqueue_root() => enqueue skb on txq from hash ... dev->real_num_tx_queues -= n ... sch_direct_xmit() dev_hard_start_xmit() ndo_start_xmit(skb,dev) => skb queue set with old hash skbs are enqueued on the qdisc with skb->queue_mapping set 0 < queue_mappings < real_num_tx_queues. When the driver decreases real_num_tx_queues skb's may be dequeued from the qdisc with a queue_mapping greater then real_num_tx_queues. This fixes a case in ixgbe where this was occurring with DCB and FCoE. Because the driver is using queue_mapping to map skbs to tx descriptor rings we can potentially map skbs to rings that no longer exist. Signed-off-by: John Fastabend <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-02minstrel_ht: fix check for downgrading of top2 rateMing Lei1-2/+2
The check should be against current top2 rate, instead of current top rate. Signed-off-by: Ming Lei <[email protected]> Acked-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-02minstrel_ht: fix updating rate with best probabilityMing Lei1-0/+2
The throughput should be considered when updating rate with best probability. Signed-off-by: Ming Lei <[email protected]> Acked-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-02netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECTEric Dumazet1-2/+4
We should release dst if dst->error is set. Bug introduced in 2.6.14 by commit e104411b82f5c ([XFRM]: Always release dst_entry on error in xfrm_lookup) Signed-off-by: Eric Dumazet <[email protected]> Cc: [email protected] Signed-off-by: Patrick McHardy <[email protected]>
2010-07-02bridge: add per bridge device controls for invoking iptablesPatrick McHardy3-9/+97
Support more fine grained control of bridge netfilter iptables invocation by adding seperate brnf_call_*tables parameters for each device using the sysfs interface. Packets are passed to layer 3 netfilter when either the global parameter or the per bridge parameter is enabled. Acked-by: Stephen Hemminger <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2010-07-01Merge branch 'master' of ↵David S. Miller19-62/+178
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/libertas/host.h
2010-06-30ethtool: Add support for control of RX flow hash indirectionBen Hutchings1-0/+80
Many NICs use an indirection table to map an RX flow hash value to one of an arbitrary number of queues (not necessarily a power of 2). It can be useful to remove some queues from this indirection table so that they are only used for flows that are specifically filtered there. It may also be useful to weight the mapping to account for user processes with the same CPU-affinity as the RX interrupts. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-30ethtool: Change ethtool_op_set_flags to validate flagsBen Hutchings1-23/+5
ethtool_op_set_flags() does not check for unsupported flags, and has no way of doing so. This means it is not suitable for use as a default implementation of ethtool_ops::set_flags. Add a 'supported' parameter specifying the flags that the driver and hardware support, validate the requested flags against this, and change all current callers to pass this parameter. Change some other trivial implementations of ethtool_ops::set_flags to call ethtool_op_set_flags(). Signed-off-by: Ben Hutchings <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected]> Acked-by: Jeff Garzik <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-30fragment: add fast path for in-order fragmentsChangli Gao2-0/+23
add fast path for in-order fragments As the fragments are sent in order in most of OSes, such as Windows, Darwin and FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue. In the fast path, we check if the skb at the end of the inet_frag_queue is the prev we expect. Signed-off-by: Changli Gao <[email protected]> ---- include/net/inet_frag.h | 1 + net/ipv4/ip_fragment.c | 12 ++++++++++++ net/ipv6/reassembly.c | 11 +++++++++++ 3 files changed, 24 insertions(+) Signed-off-by: David S. Miller <[email protected]>
2010-06-30snmp: 64bit ipstats_mib for all archesEric Dumazet4-10/+76
/proc/net/snmp and /proc/net/netstat expose SNMP counters. Width of these counters is either 32 or 64 bits, depending on the size of "unsigned long" in kernel. This means user program parsing these files must already be prepared to deal with 64bit values, regardless of user program being 32 or 64 bit. This patch introduces 64bit snmp values for IPSTAT mib, where some counters can wrap pretty fast if they are 32bit wide. # netstat -s|egrep "InOctets|OutOctets" InOctets: 244068329096 OutOctets: 244069348848 Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-30act_nat: use stack variableChangli Gao1-21/+10
act_nat: use stack variable structure tc_nat isn't too big for stack, so we can put it in stack. Signed-off-by: Changli Gao <[email protected]> ---- net/sched/act_nat.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) Signed-off-by: David S. Miller <[email protected]>
2010-06-30act_mirred: combine duplicate codeChangli Gao1-4/+2
act_mirred: combine duplicate code tcf_bstats is updated in any way, so we can do it earlier to reduce the size of the code. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Jamal Hadi Salim <[email protected]> ---- net/sched/act_mirred.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) Signed-off-by: David S. Miller <[email protected]>
2010-06-30mac82011: Allow selection of minstrel_ht as default rc algorithmHelmut Schaa1-0/+1
Allow selection of minstrel_ht as default rate control algorithm. At the moment minstrel_ht can only be requested by the driver code but not selected as default in make menuconfig. Fix this by using minstrel_ht when minstrel was selected as default and minstrel_ht is available. This change won't affect legacy devices as minstrel_ht falls back to minstrel in that case. Signed-off-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-30net/core: use ntohs for skb->protocolSebastian Andrzej Siewior1-1/+2
This is only noticed by people that are not doing everything correct in the first place. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-30ipv6: Use interface max_desync_factor instead of static defaultBen Hutchings1-4/+4
max_desync_factor can be configured per-interface, but nothing is using the value. Reported-by: Piotr Lewandowski <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-30ipv6: Clamp reported valid_lft to a minimum of 0Ben Hutchings1-2/+6
Since addresses are only revalidated every 2 minutes, the reported valid_lft can underflow shortly before the address is deleted. Clamp it to a minimum of 0, as for prefered_lft. Reported-by: Piotr Lewandowski <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-29net/Makefile: conditionally descend to wireless and ieee802154Nicolas Kaiser1-2/+2
Don't descend to wireless and ieee802154 unless they are actually used. Signed-off-by: Nicolas Kaiser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-29mac80211: add basic tracing to drv_get_surveyJohn W. Linville2-1/+28
Reported-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-29mac80211: remove unnecessary check in ieee80211_dump_surveyJohn W. Linville1-3/+0
This check is duplicated in drv_get_survey. Reported-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-29ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFHBen Hutchings1-9/+27
struct ethtool_rxnfc was originally defined in 2.6.27 for the ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data fields. It was then extended in 2.6.30 to support various additional commands. These commands should have been defined to use a new structure, but it is too late to change that now. Since user-space may still be using the old structure definition for the ETHTOOL_{G,S}RXFH commands, and since they do not need the additional fields, only copy the originally defined fields to and from user-space. Signed-off-by: Ben Hutchings <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2010-06-29ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALLBen Hutchings1-2/+3
On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutchings <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2010-06-29caif: Kconfig and Makefile fixesSjur Braendeland2-17/+4
Use "depends on" instead of "if" in Kconfig files. Fixed CAIF debug flag, and removed unnecessary clean-* options. Signed-off-by: Sjur Braendeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-28act_mirred: don't clone skb when skb isn't sharedChangli Gao1-3/+3
don't clone skb when skb isn't shared When the tcf_action is TC_ACT_STOLEN, and the skb isn't shared, we don't need to clone a new skb. As the skb will be freed after this function returns, we can use it freely once we get a reference to it. Signed-off-by: Changli Gao <[email protected]> ---- include/net/sch_generic.h | 11 +++++++++-- net/sched/act_mirred.c | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-28tcp: tso_fragment() might avoid GFP_ATOMICEric Dumazet1-3/+3
We can pass a gfp argument to tso_fragment() and avoid GFP_ATOMIC allocations sometimes. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-28vlan: 64 bit rx countersEric Dumazet3-25/+41
Use u64_stats_sync infrastructure to implement 64bit rx stats. (tx stats are addressed later) Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-28net: use this_cpu_ptr()Eric Dumazet3-4/+4
use this_cpu_ptr(p) instead of per_cpu_ptr(p, smp_processor_id()) Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-06-28mac80211: fix the for_each_sta_info macroFelix Fietkau1-8/+8
Because of an ambiguity in the for_each_sta_info macro, it can currently only be used if the third parameter is set to 'sta'. Fix this by renaming the parameter to '_sta'. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-06-28mac80211: use netif_receive_skb in ieee80211_tx_status callpathJohn W. Linville1-2/+2
This avoids the extra queueing from calling netif_rx. Signed-off-by: John W. Linville <[email protected]>
2010-06-28mac80211: use netif_receive_skb in ieee80211_rx callpathJohn W. Linville1-5/+5
This avoids the extra queueing from calling netif_rx. Signed-off-by: John W. Linville <[email protected]>
2010-06-28netfilter: ipt_LOG/ip6t_LOG: add option to print decoded MAC headerPatrick McHardy2-42/+93
The LOG targets print the entire MAC header as one long string, which is not readable very well: IN=eth0 OUT= MAC=00:15:f2:24:91:f8:00:1b:24:dc:61:e6:08:00 ... Add an option to decode known header formats (currently just ARPHRD_ETHER devices) in their individual fields: IN=eth0 OUT= MACSRC=00:1b:24:dc:61:e6 MACDST=00:15:f2:24:91:f8 MACPROTO=0800 ... IN=eth0 OUT= MACSRC=00:1b:24:dc:61:e6 MACDST=00:15:f2:24:91:f8 MACPROTO=86dd ... The option needs to be explicitly enabled by userspace to avoid breaking existing parsers. Signed-off-by: Patrick McHardy <[email protected]>
2010-06-28netfilter: ipt_LOG/ip6t_LOG: remove comparison within loopPatrick McHardy2-9/+9
Remove the comparison within the loop to print the macheader by prepending the colon to all but the first printk. Based on suggestion by Jan Engelhardt <[email protected]>. Signed-off-by: Patrick McHardy <[email protected]>