aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2012-11-21mac80211: Add debugfs callbacks for station addition/removalSujith Manoharan2-0/+41
Provide drivers with hooks to create debugfs files when a new station is added. This would help drivers to take advantage of mac80211's station list infrastructure and not maintain tedious station management code internally. Signed-off-by: Sujith Manoharan <[email protected]> [ifdef inline wrapper functions] Signed-off-by: Johannes Berg <[email protected]>
2012-11-20sctp: send abort chunk when max_retrans exceededNeil Horman2-1/+27
In the event that an association exceeds its max_retrans attempts, we should send an ABORT chunk indicating that we are closing the assocation as a result. Because of the nature of the error, its unlikely to be received, but its a nice clean way to close the association if it does make it through, and it will give anyone watching via tcpdump a clue as to what happened. Change notes: v2) * Removed erroneous changes from sctp_make_violation_parmlen Signed-off-by: Neil Horman <[email protected]> CC: Vlad Yasevich <[email protected]> CC: "David S. Miller" <[email protected]> CC: [email protected] Acked-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-20ipv6: fix inet6_csk_update_pmtu() return valueEric Dumazet1-1/+2
In case of error, inet6_csk_update_pmtu() should consistently return NULL. Bug added in commit 35ad9b9cf7d8a (ipv6: Add helper inet6_csk_update_pmtu().) Reported-by: Lluís Batlle i Rossell <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-20net: Remove redundant null check before kfree in dev.cSachin Kamat1-4/+2
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-20caif: Remove redundant null check before kfree in cfctrl.cSachin Kamat1-2/+1
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-20sit: allow to configure 6rd tunnels via netlinkNicolas Dichtel1-25/+124
This patch add the support of 6RD tunnels management via netlink. Note that netdev_state_change() is now called when 6RD parameters are updated. 6RD parameters are updated only if there is at least one 6RD attribute. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-20Bluetooth: Remove OOB data if device was discovered in bandSzymon Janc1-0/+2
OOB authentication mechanism should be used only if pairing process has been activated by previous OOB information exchange (Core Spec 4.0 , vol. 1, Part A, 5.1.4.3). Stored OOB data for specific device should be removed if that device was discovered in band later on. Signed-off-by: Szymon Janc <[email protected]> Acked-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-20Bluetooth: AMP: Set no FCS for incoming L2CAP chanAndrei Emeltchenko1-0/+1
When receiving L2CAP Create Channel Request set the channel as L2CAP_FCS_NONE. Then in "L2CAP Config req" following field will be set: "FCS Option 0x00 (No FCS)". So by default High Speed channels have no FCS. Signed-off-by: Andrei Emeltchenko <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-20Bluetooth: Improve error message printingAndrei Emeltchenko1-1/+1
Instead of printing: "[ 7763.082007] Bluetooth: 2" print something like: "[ 7763.082007] Bluetooth: Trailing bytes: 2 in sframe" Signed-off-by: Andrei Emeltchenko <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-20Bluetooth: Set local_amp_id after getting Phylink Completed evtAndrei Emeltchenko1-0/+1
local_amp_id is used in l2cap_physical_cfm and shall be set up before calling it. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-20Bluetooth: Fix sending L2CAP Create Chan ReqAndrei Emeltchenko1-11/+18
When receiving Physical Link Completed event we need to create L2CAP channel with L2CAP Create Chan Request. Current code was sending this command only if connection was pending (which is probably needed in channel move case). If channel is not moved but created Create Chan should be sent for outgoing channel which is checked with BT_CONNECT flag. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-20proc: Usable inode numbers for the namespace file descriptors.Eric W. Biederman1-0/+24
Assign a unique proc inode to each namespace, and use that inode number to ensure we only allocate at most one proc inode for every namespace in proc. A single proc inode per namespace allows userspace to test to see if two processes are in the same namespace. This has been a long requested feature and only blocked because a naive implementation would put the id in a global space and would ultimately require having a namespace for the names of namespaces, making migration and certain virtualization tricks impossible. We still don't have per superblock inode numbers for proc, which appears necessary for application unaware checkpoint/restart and migrations (if the application is using namespace file descriptors) but that is now allowd by the design if it becomes important. I have preallocated the ipc and uts initial proc inode numbers so their structures can be statically initialized. Signed-off-by: Eric W. Biederman <[email protected]>
2012-11-20userns: Allow unprivileged use of setns.Eric W. Biederman1-1/+6
- Push the permission check from the core setns syscall into the setns install methods where the user namespace of the target namespace can be determined, and used in a ns_capable call. Acked-by: Serge Hallyn <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
2012-11-20mac80211: fix channel context suspend/reconfig handlingJohannes Berg2-3/+56
Sujith reported warnings with suspend/resume due to channel contexts. When I looked into it, I realised that the code was completely broken as it unassigned the channel contexts when suspending, which actually means they are destroyed. Eliad Peller then pointed out that we also need to remove the channel contexts from the driver. When I looked into this, I also noticed that the code isn't handling the virtual monitor interface correctly (if it exists.) Fix this by calling just the driver methods (if they are implemented) instead of using the channel context management code. Also add reconfiguration for the virtual monitor interface. Reported-by: Sujith Manoharan <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-19net: remove unnecessary wireless includesJohannes Berg1-2/+0
The wireless and wext includes in net-sysfs.c aren't needed, so remove them. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-19net: rds: use this_cpu_* per-cpu helperShan Wei2-12/+14
Signed-off-by: Shan Wei <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-19net: core: use this_cpu_ptr per-cpu helperShan Wei1-3/+1
flush_tasklet is a struct, not a pointer in percpu var. so use this_cpu_ptr to get the member pointer. Signed-off-by: Shan Wei <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-20NFC: Fix nfc_llcp_local chained list insertionThierry Escande1-1/+1
list_add was called with swapped parameters Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Queue a copy of the transmitted LLCP skbSamuel Ortiz1-4/+13
Drivers are allowed to modify the sent skb and thus we need to make a copy of it before passing it to the driver. Without this fix, LLCP Tx skbs were not queued properly as the ptype check was failing due to e.g. the pn533 driver skb_pushing the Tx skb. Reported-by: Thierry Escande <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Stop sending LLCP frames when tx queues are getting too deepSamuel Ortiz1-0/+17
When the tx pending queues and/or the socket tx queue is getting too deep, we have to let userspace know. We won't be queueing any more frames until the congestion is fixed. Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Copy user space buffer when sending UI framesSamuel Ortiz1-2/+13
Using the userspace IO vector directly is wrong, we should copy it from user space first. Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Export nfc_hci_sak_to_protocol()Eric Lapuyade1-1/+2
Some HCI drivers will need it. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Export nfc_hci_result_to_errno as it can be needed by HCI driversEric Lapuyade1-1/+2
Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Dot not dispatch HCI event received on unopened pipeEric Lapuyade1-5/+8
A chip with pre-opened gates may send events on a gate that nobody has opened in the handset host. Discard those events. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Ignore err when chip doesn't implement HW/SW info registersEric Lapuyade1-0/+6
NFC_HCI_ID_MGMT_VERSION_SW and NFC_HCI_ID_MGMT_VERSION_HW are optional registers for gate NFC_HCI_ID_MGMT_GATE in standard HCI. When chip doesn't implement, just leave all the information as zeros. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19NFC: Fix hci_connect_gate() when a pre-opened pipe is passedEric Lapuyade1-2/+2
In some cases, pre-opened pipes don't stay open when a clear all pipes command is sent. They stay created however. Therefore, one can never assume that such a pipe is already open. As re-opening a pipe seems not to be a problem, we do that now. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-19Bluetooth: trivial: Use __constant for constantsAndrei Emeltchenko1-4/+4
Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-19Bluetooth: Disable FCS only for new HS channelsAndrei Emeltchenko2-1/+2
Set chan->fcs to L2CAP_FCS_NONE only for new L2CAP channels (not moved). Other side can still request to use FCS. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-19Bluetooth: Refactor locking in amp_physical_cfmAndrei Emeltchenko2-6/+7
Remove locking from l2cap_physical_cfm and lock chan inside amp_physical_cfm. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-19Bluetooth: Remove unneeded local_amp_id initializationAndrei Emeltchenko1-1/+0
local_amp_id is already set in l2cap_connect() which is called several lines above. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-19Bluetooth: Use __l2cap_no_conn_pending helperAndrei Emeltchenko1-1/+1
Use helper instead of test_bit. This is the only place left using test CONF_CONNECT_PEND flag. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
2012-11-19Merge branch 'for-john' of ↵John W. Linville2-4/+24
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
2012-11-19netfilter: Remove the spurious \ in __ip_vs_lblc_initEric W. Biederman1-1/+1
In (464dc801c76a net: Don't export sysctls to unprivileged users) I typoed and introduced a spurious backslash. Delete it. Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-19cgroup: rename ->create/post_create/pre_destroy/destroy() to ↵Tejun Heo2-8/+8
->css_alloc/online/offline/free() Rename cgroup_subsys css lifetime related callbacks to better describe what their roles are. Also, update documentation. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Li Zefan <[email protected]>
2012-11-19mac80211: make remain_on_channel() op pass vif paramEliad Peller4-10/+18
Drivers (e.g. wl12xx) might need to know the vif to roc on (mainly in order to configure the rx filters correctly). Add the vif to the op params, and update the current users (iwlwifi) to use the new api. Signed-off-by: Eliad Peller <[email protected]> [fix hwsim] Signed-off-by: Johannes Berg <[email protected]>
2012-11-19cfg80211: Add TDLS event to allow drivers to request operationsJouni Malinen2-0/+70
The NL80211_CMD_TDLS_OPER command was previously used only for userspace request for the kernel code to perform TDLS operations. However, there are also cases where the driver may need to request operations from userspace, e.g., when using security on the AP path. Add a new cfg80211 function for generating a TDLS operation event for drivers to request a new link to be set up (NL80211_TDLS_SETUP) or an existing link to be torn down (NL80211_TDLS_TEARDOWN). Drivers can optionally use these events, e.g., based on noticing data traffic being sent to a peer station that is seen with good signal strength. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-19mac80211: support radiotap vendor namespace RX dataJohannes Berg1-12/+59
In some cases, in particular for experimentation, it can be useful to be able to add vendor namespace data to received frames in addition to the normal radiotap data. Allow doing this through mac80211 by adding fields to the RX status descriptor that describe the data while the data itself is prepended to the frame. Also add some example code to hwsim, but don't enable it because it doesn't use a proper OUI identifier. Signed-off-by: Johannes Berg <[email protected]>
2012-11-19mac80211: introduce IEEE80211_NUM_TIDS and use itJohannes Berg10-44/+41
Introduce IEEE80211_NUM_TIDS in the generic 802.11 header file and use it in place of STA_TID_NUM and NUM_RX_DATA_QUEUES which are both really the number of TIDs. Signed-off-by: Johannes Berg <[email protected]>
2012-11-19mac80211: use CMAC_PN_LENJohannes Berg1-2/+3
Instead of hardcoding its value (6), use the constant. Signed-off-by: Johannes Berg <[email protected]>
2012-11-19mac80211: check add_chanctx callback before use in ieee80211_reconfigArend van Spriel1-4/+6
During testing our mac80211 driver a fatal error occurred which was signalled to mac80211. Upon performing the reconfiguration of the device a WARN_ON was triggered. This warning checked the return value of drv_add_chanctx(). However, this returns -EOPNOTSUPP when the driver does not provide the callback. As the callback is optional better check it is defined before calling drv_add_chanctx(). Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-19Fix misspellings of "whether" in comments.Adam Buchbinder1-1/+1
"Whether" is misspelled in various comments across the tree; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-11-19various: Fix spelling of "registered" in comments.Adam Buchbinder1-1/+1
Some comments misspell "registered"; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-11-19treewide: fix typo of "suport" in various comments and KconfigMasanari Iida4-4/+4
Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-11-18userns: make each net (net_ns) belong to a user_nsEric W. Biederman1-4/+12
The user namespace which creates a new network namespace owns that namespace and all resources created in it. This way we can target capability checks for privileged operations against network resources to the user_ns which created the network namespace in which the resource lives. Privilege to the user namespace which owns the network namespace, or any parent user namespace thereof, provides the same privilege to the network resource. This patch is reworked from a version originally by Serge E. Hallyn <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
2012-11-18netns: Deduplicate and fix copy_net_ns when !CONFIG_NET_NSEric W. Biederman1-7/+0
The copy of copy_net_ns used when the network stack is not built is broken as it does not return -EINVAL when attempting to create a new network namespace. We don't even have a previous network namespace. Since we need a copy of copy_net_ns in net/net_namespace.h that is available when the networking stack is not built at all move the correct version of copy_net_ns from net_namespace.c into net_namespace.h Leaving us with just 2 versions of copy_net_ns. One version for when we compile in network namespace suport and another stub for all other occasions. Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
2012-11-18net: Make CAP_NET_BIND_SERVICE per user namespaceEric W. Biederman3-6/+10
Allow privileged users in any user namespace to bind to privileged sockets in network namespaces they control. Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-18net: Enable a userns root rtnl calls that are safe for unprivilged usersEric W. Biederman9-54/+4
- Only allow moving network devices to network namespaces you have CAP_NET_ADMIN privileges over. - Enable creating/deleting/modifying interfaces - Enable adding/deleting addresses - Enable adding/setting/deleting neighbour entries - Enable adding/removing routes - Enable adding/removing fib rules - Enable setting the forwarding state - Enable adding/removing ipv6 address labels - Enable setting bridge parameter Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-18net: Enable some sysctls that are safe for the userns rootEric W. Biederman4-22/+1
- Enable the per device ipv4 sysctls: net/ipv4/conf/<if>/forwarding net/ipv4/conf/<if>/mc_forwarding net/ipv4/conf/<if>/accept_redirects net/ipv4/conf/<if>/secure_redirects net/ipv4/conf/<if>/shared_media net/ipv4/conf/<if>/rp_filter net/ipv4/conf/<if>/send_redirects net/ipv4/conf/<if>/accept_source_route net/ipv4/conf/<if>/accept_local net/ipv4/conf/<if>/src_valid_mark net/ipv4/conf/<if>/proxy_arp net/ipv4/conf/<if>/medium_id net/ipv4/conf/<if>/bootp_relay net/ipv4/conf/<if>/log_martians net/ipv4/conf/<if>/tag net/ipv4/conf/<if>/arp_filter net/ipv4/conf/<if>/arp_announce net/ipv4/conf/<if>/arp_ignore net/ipv4/conf/<if>/arp_accept net/ipv4/conf/<if>/arp_notify net/ipv4/conf/<if>/proxy_arp_pvlan net/ipv4/conf/<if>/disable_xfrm net/ipv4/conf/<if>/disable_policy net/ipv4/conf/<if>/force_igmp_version net/ipv4/conf/<if>/promote_secondaries net/ipv4/conf/<if>/route_localnet - Enable the global ipv4 sysctl: net/ipv4/ip_forward - Enable the per device ipv6 sysctls: net/ipv6/conf/<if>/forwarding net/ipv6/conf/<if>/hop_limit net/ipv6/conf/<if>/mtu net/ipv6/conf/<if>/accept_ra net/ipv6/conf/<if>/accept_redirects net/ipv6/conf/<if>/autoconf net/ipv6/conf/<if>/dad_transmits net/ipv6/conf/<if>/router_solicitations net/ipv6/conf/<if>/router_solicitation_interval net/ipv6/conf/<if>/router_solicitation_delay net/ipv6/conf/<if>/force_mld_version net/ipv6/conf/<if>/use_tempaddr net/ipv6/conf/<if>/temp_valid_lft net/ipv6/conf/<if>/temp_prefered_lft net/ipv6/conf/<if>/regen_max_retry net/ipv6/conf/<if>/max_desync_factor net/ipv6/conf/<if>/max_addresses net/ipv6/conf/<if>/accept_ra_defrtr net/ipv6/conf/<if>/accept_ra_pinfo net/ipv6/conf/<if>/accept_ra_rtr_pref net/ipv6/conf/<if>/router_probe_interval net/ipv6/conf/<if>/accept_ra_rt_info_max_plen net/ipv6/conf/<if>/proxy_ndp net/ipv6/conf/<if>/accept_source_route net/ipv6/conf/<if>/optimistic_dad net/ipv6/conf/<if>/mc_forwarding net/ipv6/conf/<if>/disable_ipv6 net/ipv6/conf/<if>/accept_dad net/ipv6/conf/<if>/force_tllao - Enable the global ipv6 sysctls: net/ipv6/bindv6only net/ipv6/icmp/ratelimit Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-18net: Allow the userns root to control vlans.Eric W. Biederman1-6/+6
Allow an unpriviled user who has created a user namespace, and then created a network namespace to effectively use the new network namespace, by reducing capable(CAP_NET_ADMIN) and capable(CAP_NET_RAW) calls to be ns_capable(net->user_ns, CAP_NET_ADMIN), or capable(net->user_ns, CAP_NET_RAW) calls. Allow the vlan ioctls: SET_VLAN_INGRESS_PRIORITY_CMD SET_VLAN_EGRESS_PRIORITY_CMD SET_VLAN_FLAG_CMD SET_VLAN_NAME_TYPE_CMD ADD_VLAN_CMD DEL_VLAN_CMD Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-18net: Allow userns root to control the network bridge code.Eric W. Biederman3-18/+19
Allow an unpriviled user who has created a user namespace, and then created a network namespace to effectively use the new network namespace, by reducing capable(CAP_NET_ADMIN) and capable(CAP_NET_RAW) calls to be ns_capable(net->user_ns, CAP_NET_ADMIN), or capable(net->user_ns, CAP_NET_RAW) calls. Allow setting bridge paramters via sysfs. Allow all of the bridge ioctls: BRCTL_ADD_IF BRCTL_DEL_IF BRCTL_SET_BRDIGE_FORWARD_DELAY BRCTL_SET_BRIDGE_HELLO_TIME BRCTL_SET_BRIDGE_MAX_AGE BRCTL_SET_BRIDGE_AGING_TIME BRCTL_SET_BRIDGE_STP_STATE BRCTL_SET_BRIDGE_PRIORITY BRCTL_SET_PORT_PRIORITY BRCTL_SET_PATH_COST BRCTL_ADD_BRIDGE BRCTL_DEL_BRDIGE Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>