aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-09-21mac80211: notify peer when shutting down peer linkThomas Pedersen1-0/+8
Send a Mesh Peering Close frame when we deactivate a mesh peer link. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-21mac80211: fix AP/VLAN PS buffer raceJohannes Berg1-6/+4
When an AP interface is removed without the AP/VLAN interfaces having been removed before already, the AP-VLAN interface might still have sleeping stations and buffer multicast frames which will happen on the AP interface. Thus, we need to remove AP/VLAN interfaces before purging buffered broadcast frames. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-21cfg80211: Fix validation of AKM suitesJouni Malinen1-1/+4
Incorrect variable was used in validating the akm_suites array from NL80211_ATTR_AKM_SUITES. In addition, there was no explicit validation of the array length (we only have room for NL80211_MAX_NR_AKM_SUITES). This can result in a buffer write overflow for stack variables with arbitrary data from user space. The nl80211 commands using the affected functionality require GENL_ADMIN_PERM, so this is only exposed to admin users. Cc: [email protected] Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-21Merge branch 'batman-adv/next' of git://git.open-mesh.org/linux-mergeDavid S. Miller15-1271/+1277
2011-09-21xfrm: Perform a replay check after return from async codepathsSteffen Klassert1-0/+5
When asyncronous crypto algorithms are used, there might be many packets that passed the xfrm replay check, but the replay advance function is not called yet for these packets. So the replay check function would accept a replay of all of these packets. Also the system might crash if there are more packets in async processing than the size of the anti replay window, because the replay advance function would try to update the replay window beyond the bounds. This pach adds a second replay check after resuming from the async processing to fix these issues. Signed-off-by: Steffen Klassert <[email protected]> Acked-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-21fib:fix BUG_ON in fib_nl_newrule when add new fib ruleGao feng1-2/+2
add new fib rule can cause BUG_ON happen the reproduce shell is ip rule add pref 38 ip rule add pref 38 ip rule add to 192.168.3.0/24 goto 38 ip rule del pref 38 ip rule add to 192.168.3.0/24 goto 38 ip rule add pref 38 then the BUG_ON will happen del BUG_ON and use (ctarget == NULL) identify whether this rule is unresolved Signed-off-by: Gao feng <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-21Bluetooth: mark l2cap_create_iframe_pdu as staticLuiz Augusto von Dentz1-1/+3
l2cap_create_iframe_pdu is only used in l2cap_core.c Signed-off-by: Luiz Augusto von Dentz <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Check 'dev_class' in mgmt_device_found()Andre Guedes1-1/+3
The mgmt_device_found event will be used to report LE devices found during discovery procedure. Since LE advertising reports events doesn't have class of device information, we need to check if 'dev_class' is not NULL before copying it. Signed-off-by: Andre Guedes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Reduce critical region.Andre Guedes1-4/+3
This patch reduces the critial region (protected by hdev->lock) in hci_cc_le_set_scan_enable(). This way, only really required code is synchronized. Signed-off-by: Andre Guedes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Fix wrong memcpy size on LE start encryptionAnderson Briglia1-1/+1
This patch fixes wrong memcpy size when copying rand value to HCI_OP_LE_START_ENC command. The compiler pretends that the array parameter was declared as a pointer and sizeof reports the size of the pointer. [1] [1] http://www.c-faq.com/aryptr/aryparmsize.html Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Anderson Lizardo <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Remove support for other SMP keys than the LTKVinicius Costa Gomes1-1/+1
For now, only the LTK is properly supported. We are able to receive and generate the other types of keys, but we are not able to use them. So it's better not request them to be distributed. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Fix not setting a pending security levelVinicius Costa Gomes1-0/+2
For slave initiated security, we should set a default security level, for now BT_SECURITY_MEDIUM. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Revert "Bluetooth: Add support for communicating keys with userspace"Vinicius Costa Gomes1-45/+15
This reverts commit 5a0a8b49746771fba79866fb9185ffa051a6a183. If we use separate messages and list for SMP specific keys we can simplify the code. Conflicts: net/bluetooth/mgmt.c Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Use the LTK after receiving a LE Security RequestVinicius Costa Gomes1-18/+28
When receiving a security request from the remote device we should find if there is already a LTK associated with the remote device, if found we should use it to encrypt the link. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Fix sending wrong authentication requirementsVinicius Costa Gomes1-17/+2
Until we support any pairing method (Passkey Entry, OOB) that gives MITM protection we shouldn't send that we have MITM protection. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add mgmt events for blacklistingAntti Julku3-34/+80
Add management interface events for blocking/unblocking a device. Sender of the block device command gets cmd complete and other mgmt sockets get the event. Event is also sent to mgmt sockets when blocking is done with ioctl, e.g when blocking a device with hciconfig. This makes it possible for bluetoothd to track status of blocked devices when a third party block or unblocks a device. Event sending is handled in mgmt_device_blocked function which gets called from hci_blacklist_add in hci_core.c. A pending command is added in mgmt_block_device, so that it can found when sending the event - the event is not sent to the socket from which the pending command came. Locks were moved out from hci_core.c to hci_sock.c and mgmt.c, because locking is needed also for mgmt_pending_add in mgmt.c. Signed-off-by: Antti Julku <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Use the MEDIUM security level for pairingsVinicius Costa Gomes1-5/+3
This lifts the requirement of 16 digits pin codes when pairing with devices that do not support SSP when using the mgmt interface. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Require authentication if MITM protection is requestedVinicius Costa Gomes1-2/+3
The HIGH security level requires a 16 digit pin code for non-SSP bondings. Sometimes this requirement is not acceptable and we still want protection againts MITM attacks (which is something that the MEDIUM security level doesn't provide), for that we should allow another way to request authentication without using the HIGH security level. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Move SMP crypto functions to a workqueueVinicius Costa Gomes2-102/+177
The function crypto_blkcipher_setkey() called by smp_e() can sleep, so all the crypto work has to be moved to hci_dev workqueue. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Move SMP fields to a separate structureVinicius Costa Gomes2-62/+54
The objective is to make the core to have as little as possible information about SMP procedures and logic. Now, all the SMP specific information is hidden from the core. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: hidp: Add support for NO_INIT_REPORTS quirkDavid Herrmann1-0/+3
During setup the host initializes all HID reports. Some devices do not support this. If this quirk is set, we skip the initialization. See also usbhid_init_reports() for this quirk. Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add LE link type for debugfs outputPeter Hurley1-0/+2
Add LE link type as known connection type for debugfs stringizing output. Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add mgmt command for fast connectable modeAntti Julku1-0/+60
Add command to management interface for enabling/disabling the fast connectable mode. Signed-off-by: Antti Julku <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add link_type information to the mgmt Connected eventVinicius Costa Gomes2-3/+4
One piece of information that was lost when using the mgmt interface, was the type of the connection. Using HCI events we used to know the type of the connection based on the type of the event, e.g. HCI_LE_Connection_Complete for LE links. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add support for running SMP without a socketVinicius Costa Gomes1-2/+8
When doing the pairing procedure we won't have an associated socket, but we still have to do the SMP negotiation. This adds support for encrypting the link and exchanging keys. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add support for pairing via mgmt over LEVinicius Costa Gomes1-2/+13
Using the advertising cache we are able to infer the type of the remote device, and so trigger pairing over the correct link type. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Add a flag to indicate that SMP is going onVinicius Costa Gomes2-11/+37
Add HCI_CONN_LE_SMP_PEND flag to indicate that SMP is pending for that connection. This allows to have information that an SMP procedure is going on for that connection. We use the HCI_CONN_ENCRYPT_PEND to indicate that encryption (HCI_LE_Start_Encryption) is pending for that connection. While a SMP procedure is going on we hold an reference to the connection, to avoid disconnections. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: Reset the security timer when a command is queuedVinicius Costa Gomes1-12/+3
Each time a SMP command is enqueued, we reset the SMP timer, this way we follow exactly what the spec mandates: "The Security Manager Timer shall be reset when an L2CAP SMP command is queued for transmission." Vol. 3, Part H, Section 3.4 Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-21Bluetooth: make use of connection number to optimize the schedulerLuiz Augusto von Dentz1-0/+15
This checks if there is any existing connection according to its type before start iterating in the list and immediately stop iterating when reaching the number of connections. Signed-off-by: Luiz Augusto von Dentz <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-09-20ipv6: fix a possible double freeRoy Li1-2/+2
When calling snmp6_alloc_dev fails, the snmp6 relevant memory are freed by snmp6_alloc_dev. Calling in6_dev_finish_destroy will free these memory twice. Double free will lead that undefined behavior occurs. Signed-off-by: Roy Li <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-20ip6_tunnel: add optional fwmark inheritEric Dumazet1-7/+16
Add IP6_TNL_F_USE_ORIG_FWMARK to ip6_tunnel, so that ip6_tnl_xmit2() makes a route lookup taking into account skb->fwmark and doesnt cache lookup result. This permits more flexibility in policies and firewall setups. To setup such a tunnel, "fwmark inherit" option should be added to "ip -f inet6 tunnel" command. Reported-by: Anders Franzen <[email protected]> CC: Hans Schillström <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-20NFC: basic NCI protocol implementationIlan Elias9-0/+1633
The NFC Controller Interface (NCI) is a standard communication protocol between an NFC Controller (NFCC) and a Device Host (DH), defined by the NFC Forum. Signed-off-by: Ilan Elias <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-20NFC: move nfc.h from include/net to include/net/nfcIlan Elias1-1/+1
The file nfc.h was moved from include/net to include/net/nfc, since new NFC header files will be added to include/net/nfc. Signed-off-by: Ilan Elias <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-20NFC: Add dev_up and dev_down control operationsIlan Elias3-0/+137
Add 2 new nfc control operations: dev_up to turn on the nfc device dev_down to turn off the nfc device Signed-off-by: Ilan Elias <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-20mac80211: fix indentationAlexander Simon1-1/+1
Signed-off-by: Alexander Simon <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-20wireless: Do not allow disabled channel in scan requestRajkumar Manoharan1-7/+12
cfg80211_conn_scan allows disabled channels at scan request. Hence probe request was seen at the disabled one. This patch ensures that disabled channel never be added into the scan request's channel list. Acked-by: Johannes Berg <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-20Merge branch 'tipc-Sep17-2011' of ↵David S. Miller16-197/+239
git://openlinux.windriver.com/people/paulg/net-next
2011-09-20Merge branch 'master' of git://git.infradead.org/users/linville/wirelessJohn W. Linville20-99/+118
Conflicts: drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c drivers/net/wireless/rt2x00/rt2800usb.c drivers/net/wireless/wl12xx/main.c
2011-09-20Merge branch 'master' of ssh://infradead/~/public_git/wireless into for-davemJohn W. Linville3-9/+11
2011-09-19cfg80211/nl80211: Add PMKSA caching candidate eventJouni Malinen3-0/+61
When the driver (or most likely firmware) decides which AP to use for roaming based on internal scan result processing, user space needs to be notified of PMKSA caching candidates to allow RSN pre-authentication to be used. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-19rfkill: properly assign a boolean typeMohammed Shafi Shajakhan1-1/+1
Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-19cfg80211: validate IBSS BSSIDJohannes Berg1-1/+5
The IBSS BSSID is never validated, so an invalid one might end up being used. Fix this by rejecting invalid configuration. Reported-by: Marek Lindner <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-19mac80211: Fix regression on queue stop during 2040 bss changeRajkumar Manoharan1-19/+24
The commit "mac80211: stop tx before doing hw config and rate update" stops the tx queue and call drv_flush so frequently whenever a beacon got received with 11n htcap. This leads to massive "Failed to stop TX DMA" logspam on embedded hw. So the queue stop and flush should be called if and only if there is a change in the channel type. Reported-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-19cfg80211: add cfg80211_find_vendor_ie() functionEliad Peller1-0/+27
Add function to find vendor-specific ie (along with vendor-specific ie struct definition and P2P OUI values) Signed-off-by: Eliad Peller <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-19Merge branch 'master' of ssh://infradead/~/public_git/wireless-next into ↵John W. Linville35-257/+427
for-davem
2011-09-19Merge branch 'for-3.1' of git://github.com/padovan/bluetooth-nextJohn W. Linville1-9/+8
2011-09-18tcp: fix validation of D-SACKZheng Yan1-1/+1
D-SACK is allowed to reside below snd_una. But the corresponding check in tcp_is_sackblock_valid() is the exact opposite. It looks like a typo. Signed-off-by: Zheng Yan <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-09-18Merge git://github.com/davem330/netLinus Torvalds30-142/+187
* git://github.com/davem330/net: (62 commits) ipv6: don't use inetpeer to store metrics for routes. can: ti_hecc: include linux/io.h IRDA: Fix global type conflicts in net/irda/irsysctl.c v2 net: Handle different key sizes between address families in flow cache net: Align AF-specific flowi structs to long ipv4: Fix fib_info->fib_metrics leak caif: fix a potential NULL dereference sctp: deal with multiple COOKIE_ECHO chunks ibmveth: Fix checksum offload failure handling ibmveth: Checksum offload is always disabled ibmveth: Fix issue with DMA mapping failure ibmveth: Fix DMA unmap error pch_gbe: support ML7831 IOH pch_gbe: added the process of FIFO over run error pch_gbe: fixed the issue which receives an unnecessary packet. sfc: Use 64-bit writes for TX push where possible Revert "sfc: Use write-combining to reduce TX latency" and follow-ups bnx2x: Fix ethtool advertisement bnx2x: Fix 578xx link LED bnx2x: Fix XMAC loopback test ...
2011-09-17tipc: Remove unused link event tracking codeYing Xue2-11/+0
Elimintes prototype link event tracking functionality that has never been fleshed out and doesn't do anything useful at the current time. Signed-off-by: Ying Xue <[email protected]> Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-09-17tipc: Remove callback field from subscription structureYing Xue2-8/+1
Eliminate the "event_cb" member from TIPC's "subscription" structure since the function pointer it holds always points to subscr_send_event(). Signed-off-by: Ying Xue <[email protected]> Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>