aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-07-14net: remove NETIF_F_ALL_TX_OFFLOADSMichał Mirosław1-1/+5
There is no software fallback implemented for SCTP or FCoE checksumming, and so it should not be passed on by software devices like bridge or bonding. For VLAN devices, this is different. First, the driver for underlying device should be prepared to get offloaded packets even when the feature is disabled (especially if it advertises it in vlan_features). Second, devices under VLANs do not get replaced without tearing down the VLAN first. This fixes a mess I accidentally introduced while converting bonding to ndo_fix_features. NETIF_F_SOFT_FEATURES are removed from BOND_VLAN_FEATURES because they are unused as of commit 712ae51afd. Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14net: sctp: fix checksum marking for outgoing packetsMichał Mirosław1-11/+8
Packets to devices without NETIF_F_SCTP_CSUM (including NETIF_F_NO_CSUM) should be properly checksummed because the packets can be diverted or rerouted after construction. This still leaves packets diverted from NETIF_F_SCTP_CSUM-enabled devices with broken checksums. Fixing this needs implementing software offload fallback in networking core. For users of sctp_checksum_disable, skb->ip_summed should be left as CHECKSUM_NONE and not CHECKSUM_UNNECESSARY as per include/linux/skbuff.h. Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14net: remove SK_ROUTE_CAPS from meta ematchMichał Mirosław1-7/+0
Remove it, as it indirectly exposes netdev features. It's not used in iproute2 (2.6.38) - is anything else using its interface? Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14net: remove /sys/class/net/*/featuresMichał Mirosław1-2/+0
The same information and more can be obtained by using ethtool with ETHTOOL_GFEATURES. Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14net: unexport netdev_fix_features()Michał Mirosław1-2/+1
It is not used anywhere except net/core/dev.c now. Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14net: cleanup vlan_features setting in register_netdevMichał Mirosław1-5/+2
vlan_features contains features inherited from underlying device. NETIF_SOFT_FEATURES are not inherited but belong to the vlan device itself (ensured in vlan_dev_fix_features()). Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14net: vlan: remove reduntant check in ndo_fix_features callbackMichał Mirosław1-2/+1
Use the fact that ORing with zero is a no-op. Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14af-packet: fix - avoid reading stale dataChetan Loke1-1/+2
Currently we flush tp_status and then flush the remainder of the header+payload. tp_status should be flushed in the end to avoid stale data being read by user-space. Incorrectly re-ordered barriers in v1. Signed-off-by: Chetan Loke <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-14Merge branch 'master' of ↵David S. Miller23-95/+197
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/bluetooth/l2cap_core.c
2011-07-14net: Embed hh_cache inside of struct neighbour.David S. Miller6-81/+48
Now that there is a one-to-one correspondance between neighbour and hh_cache entries, we no longer need: 1) dynamic allocation 2) attachment to dst->hh 3) refcounting Initialization of the hh_cache entry is indicated by hh_len being non-zero, and such initialization is always done with the neighbour's lock held as a writer. Signed-off-by: David S. Miller <[email protected]>
2011-07-13Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds2-17/+12
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: SUNRPC: Fix use of static variable in rpcb_getport_async NFSv4.1: update nfs4_fattr_bitmap_maxsz SUNRPC: Fix a race between work-queue and rpc_killall_tasks pnfs: write: Set mds_offset in the generic layer - it is needed by all LDs
2011-07-13mac80211: allow driver to disconnect after resumeJohannes Berg6-6/+63
In WoWLAN, devices may use crypto keys for TX/RX and could also implement GTK rekeying. If the driver isn't able to retrieve replay counters and similar information from the device upon resume, or if the device isn't responsive due to platform issues, it isn't safe to keep the connection up as GTK rekey messages from during the sleep time could be replayed against it. The only protection against that is disconnecting from the AP. Modifying mac80211 to do that while it is resuming would be very complex and invasive in the case that the driver requires a reconfig, so do it after it has resumed completely. In that case, however, packets might be replayed since it can then only happen after TX/RX are up again, so mark keys for interfaces that need to disconnect as "tainted" and drop all packets that are sent or received with those keys. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-13mac80211: remove a redundant checkMohammed Shafi Shajakhan1-2/+1
is_valid_ether_addr itself checks for is_zero_ether_addr Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-13net: Kill support for multiple hh_cache entries per neighbourDavid S. Miller1-19/+18
This never, ever, happens. Neighbour entries are always tied to one address family, and therefore one set of dst_ops, and therefore one dst_ops->protocol "hh_type" value. This capability was blindly imported by Alexey Kuznetsov when he wrote the neighbour layer. Signed-off-by: David S. Miller <[email protected]>
2011-07-13net: Push protocol type directly down to header_ops->cache()David S. Miller2-3/+2
Signed-off-by: David S. Miller <[email protected]>
2011-07-13ipv4: Inline neigh binding.David Miller2-27/+27
Get rid of all of the useless and costly indirection by doing the neigh hash table lookup directly inside of the neighbour binding. Rename from arp_bind_neighbour to rt_bind_neighbour. Use new helpers {__,}ipv4_neigh_lookup() In rt_bind_neighbour() get rid of useless tests which are never true in the context this function is called, namely dev is never NULL and the dst->neighbour is always NULL. Signed-off-by: David S. Miller <[email protected]>
2011-07-12netdevice: Kill 'feature' test macros.David S. Miller1-16/+0
Almost all of these have long outstayed their welcome. And for every one of these macros, there are 10 features for which we didn't add macros. Let's just delete them all, and get out of habit of doing things this way. Signed-off-by: David S. Miller <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2011-07-12sunrpc: use dprint_status() macro in call_decode()Vasily Averin1-2/+1
common dprint_status() macro is used in all callbacks but not in call_decode() Signed-off-by: Vasily Averin <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-07-12SUNRPC: Fix use of static variable in rpcb_getport_asyncBen Greear1-1/+1
Because struct rpcbind_args *map was declared static, if two threads entered this method at the same time, the values assigned to map could be sent two two differen tasks. This could cause all sorts of problems, include use-after-free and double-free of memory. Fix this by removing the static declaration so that the map pointer is on the stack. Signed-off-by: Ben Greear <[email protected]> Cc: [email protected] Signed-off-by: Trond Myklebust <[email protected]>
2011-07-11inetpeer: kill inet_putpeer raceEric Dumazet1-5/+9
We currently can free inetpeer entries too early : [ 782.636674] WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (f130f44c) [ 782.636677] 1f7b13c100000000000000000000000002000000000000000000000000000000 [ 782.636686] i i i i u u u u i i i i u u u u i i i i u u u u u u u u u u u u [ 782.636694] ^ [ 782.636696] [ 782.636698] Pid: 4638, comm: ssh Not tainted 3.0.0-rc5+ #270 Hewlett-Packard HP Compaq 6005 Pro SFF PC/3047h [ 782.636702] EIP: 0060:[<c13fefbb>] EFLAGS: 00010286 CPU: 0 [ 782.636707] EIP is at inet_getpeer+0x25b/0x5a0 [ 782.636709] EAX: 00000002 EBX: 00010080 ECX: f130f3c0 EDX: f0209d30 [ 782.636711] ESI: 0000bc87 EDI: 0000ea60 EBP: f0209ddc ESP: c173134c [ 782.636712] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 782.636714] CR0: 8005003b CR2: f0beca80 CR3: 30246000 CR4: 000006d0 [ 782.636716] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 [ 782.636717] DR6: ffff4ff0 DR7: 00000400 [ 782.636718] [<c13fbf76>] rt_set_nexthop.clone.45+0x56/0x220 [ 782.636722] [<c13fc449>] __ip_route_output_key+0x309/0x860 [ 782.636724] [<c141dc54>] tcp_v4_connect+0x124/0x450 [ 782.636728] [<c142ce43>] inet_stream_connect+0xa3/0x270 [ 782.636731] [<c13a8da1>] sys_connect+0xa1/0xb0 [ 782.636733] [<c13a99dd>] sys_socketcall+0x25d/0x2a0 [ 782.636736] [<c149deb8>] sysenter_do_call+0x12/0x28 [ 782.636738] [<ffffffff>] 0xffffffff Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-11mac80211: allocate only one RX queueJohannes Berg1-2/+2
We don't have multiple RX queues, so there's no use in allocating multiple, use alloc_netdev_mqs() to allocate multiple TX but only one RX queue. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-11mac80211: add driver RSSI threshold eventsMeenakshi Venkataraman5-0/+125
mac80211 maintains a running average of the RSSI when a STA is associated to an AP. Report threshold events to any driver that has registered callbacks for getting RSSI measurements. Implement callbacks in mac80211 so that driver can set thresholds. Add callbacks in mac80211 which is invoked when an RSSI threshold event occurs. mac80211: add tracing to rssi_reports api and remove extraneous fn argument mac80211: scale up rssi thresholds from driver by 16 before storing Signed-off-by: Meenakshi Venkataraman <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-11Merge branch 'master' of ↵John W. Linville8-257/+599
master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6 Conflicts: net/bluetooth/l2cap_core.c
2011-07-11Merge branch 'master' of ↵John W. Linville9-24/+54
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/ath/ath5k/sysfs.c net/bluetooth/l2cap_core.c net/mac80211/wpa.c
2011-07-11Merge branch 'master' into for-nextJiri Kosina85-364/+451
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
2011-07-11ipv4: Use universal hash for ARP.David S. Miller2-2/+2
We need to make sure the multiplier is odd. Signed-off-by: David S. Miller <[email protected]>
2011-07-11neigh: Store hash shift instead of mask.David S. Miller1-24/+23
And mask the hash function result by simply shifting down the "->hash_shift" most significant bits. Currently which bits we use is arbitrary since jhash produces entropy evenly across the whole hash function result. But soon we'll be using universal hashing functions, and in those cases more entropy exists in the higher bits than the lower bits, because they use multiplies. Signed-off-by: David S. Miller <[email protected]>
2011-07-11Bluetooth: Fixes l2cap "command reject" reply according to specIlia Kolomisnky1-6/+9
There can 3 reasons for the "command reject" reply produced by the stack. Each such reply should be accompanied by the relevand data ( as defined in spec. ). Currently there is one instance of "command reject" reply with reason "invalid cid" wich is fixed. Also, added clean-up definitions related to the "command reject" replies. Signed-off-by: Ilia Kolomisnky <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-09skbuff: clear tx zero-copy flagShirley Ma1-0/+3
This patch clears tx zero-copy flag as needed. Signed-off-by: Shirley Ma <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-08Bluetooth: Add support for returning the encryption key sizeVinicius Costa Gomes1-0/+4
This will be useful when userspace wants to restrict some kinds of operations based on the length of the key size used to encrypt the link. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Add support for storing the key sizeVinicius Costa Gomes4-8/+14
In some cases it will be useful having the key size used for encrypting the link. For example, some profiles may restrict some operations depending on the key length. The key size is stored in the key that is passed to userspace using the pin_length field in the key structure. For now this field is only valid for LE controllers. 3.0+HS controllers define the Read Encryption Key Size command, this field is intended for storing the value returned by that command. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Add support for communicating keys with userspaceVinicius Costa Gomes1-15/+45
As the key format has changed to something that has a dynamic size, the way that keys are received and sent must be changed. The structure fields order is changed to make the parsing of the information received from the Management Interface easier. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Remove unused field in hci_connVinicius Costa Gomes1-2/+0
Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Use the stored LTK for restabilishing securityVinicius Costa Gomes1-0/+12
Now that it's possible that the exchanged key is present in the link key list, we may be able to estabilish security with an already existing key, without need to perform any SMP procedure. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Use the link key list to temporarily store the STKVinicius Costa Gomes1-8/+15
With this we can use only one place to store all keys, without need to use a field in the connection structure for this purpose. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Add support for storing the LTKVinicius Costa Gomes1-6/+14
Now when the LTK is received from the remote or generated it is stored, so it can later be used. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Fix SM pairing parameters negotiationVinicius Costa Gomes1-10/+30
Before implementing SM key distribution, the pairing features exchange must be better negotiated, taking into account some features of the host and connection requirements. If we are in the "not pairable" state, it makes no sense to exchange any key. This allows for simplification of the key negociation method. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Reject an encryption request when the key isn't foundVinicius Costa Gomes1-2/+16
Now that we have methods to finding keys by its parameters we can reject an encryption request if the key isn't found. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08Bluetooth: Add functions to manipulate the link key list for SMPVinicius Costa Gomes1-0/+73
As the LTK (the new type of key being handled now) has more data associated with it, we need to store this extra data and retrieve the keys based on that data. Methods for searching for a key and for adding a new LTK are introduced here. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_checkMichal Hocko3-8/+2
Since ca5ecddf (rcu: define __rcu address space modifier for sparse) rcu_dereference_check use rcu_read_lock_held as a part of condition automatically so callers do not have to do that as well. Signed-off-by: Michal Hocko <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-07-08Bluetooth: Add support for SMP phase 3 (key distribution)Vinicius Costa Gomes2-2/+113
This adds support for generating and distributing all the keys specified in the third phase of SMP. This will make possible to re-establish secure connections, resolve private addresses and sign commands. For now, the values generated are random. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-07-08sctp: ABORT if receive, reassmbly, or reodering queue is not empty while ↵Thomas Graf2-8/+21
closing socket 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 <[email protected]> Acked-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-08Merge branch 'for-davem' of ↵David S. Miller23-26/+1924
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2011-07-08Merge branch 'for-davem' of ↵David S. Miller10-27/+67
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2011-07-08dcbnl: unlock on an error path in dcbnl_cee_fill()Dan Carpenter1-1/+1
We need to release "dcb_lock" which we took on the previous line. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-08XFRM: Fix memory leak in xfrm_state_updateTushar Gohad1-0/+2
Upon "ip xfrm state update ..", xfrm_add_sa() takes an extra reference on the user-supplied SA and forgets to drop the reference when xfrm_state_update() returns 0. This leads to a memory leak as the parameter SA is never freed. This change attempts to fix the leak by calling __xfrm_state_put() when xfrm_state_update() updates a valid SA (err = 0). The parameter SA is added to the gc list when the final reference is dropped by xfrm_add_sa() upon completion. Signed-off-by: Tushar Gohad <[email protected]> Acked-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-08cfg80211: return -ENOENT when stopping sched_scan while not runningLuciano Coelho1-1/+1
If we try to stop a scheduled scan while it is not running, we should return -ENOENT instead of simply ignoring the command and returning success. This is more consistent with other parts of the code. Reported-by: Johannes Berg <[email protected]> Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-08Merge branch 'batman-adv/next' of git://git.open-mesh.org/linux-mergeDavid S. Miller6-32/+147
2011-07-08mac80211: Restart STA timers only on associated stateRajkumar Manoharan1-0/+3
A panic was observed when the device is failed to resume properly, and there are no running interfaces. ieee80211_reconfig tries to restart STA timers on unassociated state. Cc: [email protected] Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-08mac80211: allow driver to generate P1K for IV32Johannes Berg1-6/+3
In order to support pre-populating the P1K cache in iwlwifi hardware for WoWLAN, we need to calculate the P1K for the current IV32. Allow drivers to get the P1K for any given IV32 instead of for a given packet, but keep the packet-based version around as an inline. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>