aboutsummaryrefslogtreecommitdiff
path: root/include/net
AgeCommit message (Collapse)AuthorFilesLines
2011-02-10inetpeer: Add redirect and PMTU discovery cached info.David S. Miller1-7/+11
Validity of the cached PMTU information is indicated by it's expiration value being non-zero, just as per dst->expires. The scheme we will use is that we will remember the pre-ICMP value held in the metrics or route entry, and then at expiration time we will restore that value. In this way PMTU expiration does not kill off the cached route as is done currently. Redirect information is permanent, or at least until another redirect is received. Signed-off-by: David S. Miller <[email protected]>
2011-02-10inetpeer: Abstract address representation further.David S. Miller1-6/+10
Future changes will add caching information, and some of these new elements will be addresses. Since the family is implicit via the ->daddr.family member, replicating the family in ever address we store is entirely redundant. Signed-off-by: David S. Miller <[email protected]>
2011-02-08net: Kill NETEVENT_PMTU_UPDATE.David S. Miller1-1/+0
Nobody actually does anything in response to the event, so just kill it off. Signed-off-by: David S. Miller <[email protected]>
2011-02-08net: Remove bogus barrier() in dst_allfrag().David S. Miller1-2/+0
I simply missed this one when modifying the other dst metric interfaces earlier. Signed-off-by: David S. Miller <[email protected]>
2011-02-08ipsec: allow to align IPv4 AH on 32 bitsNicolas Dichtel1-0/+1
The Linux IPv4 AH stack aligns the AH header on a 64 bit boundary (like in IPv6). This is not RFC compliant (see RFC4302, Section 3.3.3.2.1), it should be aligned on 32 bits. For most of the authentication algorithms, the ICV size is 96 bits. The AH header alignment on 32 or 64 bits gives the same results. However for SHA-256-128 for instance, the wrong 64 bit alignment results in adding useless padding in IPv4 AH, which is forbidden by the RFC. To avoid breaking backward compatibility, we use a new flag (XFRM_STATE_ALIGN4) do change original behavior. Initial patch from Dang Hongwu <[email protected]> and Christophe Gouault <[email protected]>. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-08Merge branch 'master' of ↵David S. Miller1-1/+57
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2011-02-08Bluetooth: move __l2cap_sock_close() to l2cap_sock.cGustavo F. Padovan1-0/+2
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_sendmsg() to l2cap_sock.cGustavo F. Padovan1-3/+8
Also moves some L2CAP sending functions declaration to l2cap.h Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_shutdown() to l2cap_sock.cGustavo F. Padovan1-1/+2
Declare __l2cap_wait_ack() and l2cap_sock_clear_timer() in l2cap.h Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_recvmsg() to l2cap_sock.cGustavo F. Padovan1-1/+4
It causes the move of the declaration of 3 functions to l2cap.h: l2cap_get_ident(), l2cap_send_cmd(), l2cap_build_conf_req() Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_connect() to l2cap_sock.cGustavo F. Padovan1-1/+1
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_getsockopt() to l2cap_sock.cGustavo F. Padovan1-1/+0
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_setsockopt() to l2cap_sock.cGustavo F. Padovan1-1/+0
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_getname() to l2cap_sock.cGustavo F. Padovan1-1/+0
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_accept() to l2cap_sock.cGustavo F. Padovan1-1/+0
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_bind()/listen() to l2cap_sock.cGustavo F. Padovan1-2/+0
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_release() to l2cap_sock.cGustavo F. Padovan1-1/+0
Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: move l2cap_sock_ops to l2cap_sock.cGustavo F. Padovan1-0/+12
First step to move all l2cap_sock_ops function to l2cap_sock.c Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Initial work for L2CAP split.Gustavo F. Padovan1-0/+15
This patch tries to do the minimal to move l2cap_sock_create() and its dependencies to l2cap_sock.c. It create a API to initialize and cleanup the L2CAP sockets from l2cap_core.c through l2cap_init_sockets() and l2cap_cleanup_sockets(). Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add set_io_capability management commandJohan Hedberg3-0/+16
This patch adds a new set_io_capability management command which is used to set the IO capability for Secure Simple Pairing (SSP) as well as the Security Manager Protocol (SMP). The value is per hci_dev and each hci_conn object inherits it upon creation. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add support for PIN code handling in the management interfaceJohan Hedberg3-0/+32
This patch adds the necessary commands and events needed to communicate PIN code related actions between the kernel and userspace. This includes a pin_code_request event as well as pin_code_reply and pin_code_negative_reply commands. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add get_connections managment interface commandJohan Hedberg1-0/+10
This patch adds a get_connections command to the management interface. With this command userspace can get the current list of connected devices. Typically this command would only be used once when enumerating existing adapters. After that the connected and disconnected events are used to track connections. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add support for connect failed management eventJohan Hedberg2-0/+8
This patch add a new connect failed management event to track failures in connecting to remote devices. It is particularly useful for security mode 3 scenarios when we don't have a connected state while pairing but still need to detect when the connect attempt failed. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add disconnect managment commandJohan Hedberg2-0/+11
This patch adds a disconnect command to the managment interface. Using this command user space is able to force the disconnection of connected devices. The command maps directly to the Disconnect HCI command. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add connected/disconnected management eventsJohan Hedberg2-0/+14
This patch adds connected and disconnected managment events to track the connection status to remote devices. The events map directly to successful connection complete and disconnection complete HCI events for ACL links. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Implement link key handling for the management interfaceJohan Hedberg3-0/+48
This patch adds a management commands to feed the kernel with all stored link keys as well as remove specific ones or all of them. Once the load_keys command has been called the kernel takes over link key replies. A new_key event is also added to inform userspace of newly created link keys that should be stored permanently. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add class of device control to the management interfaceJohan Hedberg3-0/+18
This patch adds the possibility for user space to fully control the Class of Device value of local adapters. To control the service class bits each UUID that's added comes with a service class "hint" which acts as a mask of bits that the UUID needs to have enabled. The set_service_cache management command is used to make sure we queue up all UUID changes as user space initializes its drivers and then send a single HCI_Write_Class_of_Device command when initialization is complete. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Implement a more complete adapter initialization sequenceJohan Hedberg2-0/+13
Using the managment interface means that user space doesn't need to do any HCI command sending at all. This patch moves the remaining initialization commands from user space to the kernel side. The patch makes use of the new feature of __hci_request which allows the request to be dynamically modified while it is ongoing (something that is needed to react appropriately to the local features and the version of the adapter). Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add controller side link key clearing to hci_init_reqJohan Hedberg1-0/+6
The controller may have link keys in its own memory and these keys could be used for secure connections. However, since the interface to access these keys doesn't provide information about the key types (which would be needed to infer the level of security each key provides) using these keys is rather useless. Therefore, simply clear the controller side list in the initialization procedure. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add special handling with __hci_request and HCI_INITJohan Hedberg1-1/+2
To support a more dynamic HCI initialization sequence the __hci_request behavior requires some more changes. Particularly, the init sequence should be able to have conditionals in it (sending some HCI commands depending on the outcome of a previous command) instead of being a fixed list as it is right now. The reasons for these additional requirements are the moving all previously user space driven initialization commands to the kernel side as well as the support the Low Energy controllers. To fulfull these requirements the init sequence is made the only special case for multi-command requests and req_last_cmd is renamed to init_last_cmd. The hci_send_cmd function is changed to update init_last_cmd as long as the HCI_INIT flag is set. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Reject pairing requests when in non-pairable modeJohan Hedberg2-0/+18
This patch adds the necessary logic to act accordingly when the HCI_PAIRABLE flag is not set. In that case PIN code replies as well as Secure Simple Pairing requests without a NoBonding requirement need to be rejected. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Implement UUID handling through the management interfaceJohan Hedberg2-0/+22
This patch adds methods to the management interface for userspace to notify the kernel of which services have been registered for specific adapters. This information is needed for setting the appropriate Class of Device value as well as the Extended Inquiry Response value. This patch doesn't actually implement setting of these values but just provides the storage of the UUIDs so the needed functionality can be built on top of it. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Implement set_pairable managment commandJohan Hedberg2-0/+5
This patch implements a new set_pairable management command to control the pairable state of local adapters. The state is represented using a new HCI_PAIRABLE flag in the hci_dev struct. For backwards compatibility with older user space versions the HCI_PAIRABLE flag gets automatically set when the existence of an adapter is reported to user space through legacy methods and the HCI_MGMT flag is not set. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add flag to track managment controlled adaptersJohan Hedberg1-0/+1
This patch adds a HCI_MGMT flag to track adapters which are under the control of the management interface. This is needed to make sure that new kernels will work with old user space versions. I.e. behaviour which could break old user space versions (but is needed by the management interface) should not be exhibited when the HCI_MGMT flag is not set. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Unify mode related management messages to a single structJohan Hedberg1-35/+4
The powered, connectable and discoverable messages all have the same format. By using a single struct for all of them a lot of code can be simplified and reused. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add set_connectable management commandJohan Hedberg2-0/+18
This patch adds a set_connectable command as well as a corresponding event to the management interface. It's mainly useful for setting an adapter as connectable from a non-initialized state as well as setting an already initialized adapter as non-connectable (mostly useful for qualification purposes). Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add support for set_discoverable management commandJohan Hedberg2-0/+17
This patch adds a set_discoverable command to the management interface as well as the corresponding event. The command is used to control the discoverable state of adapters. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add support for set_powered management commandJohan Hedberg2-1/+12
This patch adds a set_powered command to the management interface through which the powered state of local adapters can be controlled. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Add support for management powered eventJohan Hedberg2-0/+7
This patch adds support for the powered event that's used to indicate to userspace when the powered state of a local adapter changes. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Implement automatic setup procedure for local adaptersJohan Hedberg2-0/+9
This patch implements automatic initialization of basic information about newly registered Bluetooth adapters. E.g. the address and features are always needed so it makes sense for the kernel to automatically power on adapters and read this information. A new HCI_SETUP flag is added to track this state. In order to not consume unnecessary amounts of power if there isn't a user space available that could switch the adapter back off, a timer is added to do this automatically as long as no Bluetooth user space seems to be present. A new HCI_AUTO_OFF flag is added that user space needs to clear to avoid the automatic power off. Additionally, the management interface index_added event is moved to the end of the HCI_SETUP stage so a user space supporting the managment inteface has all the necessary information available for fetching when it gets notified of a new adapter. The HCI_DEV_REG event is kept in the same place as before since existing HCI raw socket based user space versions depend on seeing the kernels initialization sequence (hci_init_req) to determine when the adapter is ready for use. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-08Bluetooth: Use non-flushable by default L2CAP data packetsAndrei Emeltchenko4-0/+9
Modification of Nick Pelly <[email protected]> patch. With Bluetooth 2.1 ACL packets can be flushable or non-flushable. This commit makes ACL data packets non-flushable by default on compatible chipsets, and adds the BT_FLUSHABLE socket option to explicitly request flushable ACL data packets for a given L2CAP socket. This is useful for A2DP data which can be safely discarded if it can not be delivered within a short time (while other ACL data should not be discarded). Note that making ACL data flushable has no effect unless the automatic flush timeout for that ACL link is changed from its default of 0 (infinite). Default packet types (for compatible chipsets): Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits) Bluetooth HCI H4 Bluetooth HCI ACL Packet .... 0000 0000 0010 = Connection Handle: 0x0002 ..00 .... .... .... = PB Flag: First Non-automatically Flushable Packet (0) 00.. .... .... .... = BC Flag: Point-To-Point (0) Data Total Length: 8 Bluetooth L2CAP Packet After setting BT_FLUSHABLE (sock.setsockopt(274 /*SOL_BLUETOOTH*/, 8 /* BT_FLUSHABLE */, 1 /* flush */)) Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits) Bluetooth HCI H4 Bluetooth HCI ACL Packet .... 0000 0000 0010 = Connection Handle: 0x0002 ..10 .... .... .... = PB Flag: First Automatically Flushable Packet (2) 00.. .... .... .... = BC Flag: Point-To-Point (0) Data Total Length: 8 Bluetooth L2CAP Packet Signed-off-by: Andrei Emeltchenko <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-05tcp: Add reference to initial CWND ietf draft.David S. Miller1-1/+1
Suggested by Alexander Zimmermann Signed-off-by: David S. Miller <[email protected]>
2011-02-04inetpeer: Move ICMP rate limiting state into inet_peer entries.David S. Miller3-5/+3
Like metrics, the ICMP rate limiting bits are cached state about a destination. So move it into the inet_peer entries. If an inet_peer cannot be bound (the reason is memory allocation failure or similar), the policy is to allow. Signed-off-by: David S. Miller <[email protected]>
2011-02-04Merge branch 'master' of ↵David S. Miller2-4/+2
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2011-02-03include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argumentJulia Lawall1-1/+2
nlmsg_cancel can accept NULL as its second argument, so for similarity, this patch extends genlmsg_cancel to be able to accept a NULL second argument as well. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-03mac80211: Add testing functionality for TKIPJouni Malinen1-0/+4
TKIP countermeasures depend on devices being able to detect Michael MIC failures on received frames and for stations to report errors to the AP. In order to test that behavior, it is useful to be able to send out TKIP frames with incorrect Michael MIC. This testing behavior has minimal effect on the TX path, so it can be added to mac80211 for convenient use. The interface for using this functionality is a file in mac80211 netdev debugfs (tkip_mic_test). Writing a MAC address to the file makes mac80211 generate a dummy data frame that will be sent out using invalid Michael MIC value. In AP mode, the address needs to be for one of the associated stations or ff:ff:ff:ff:ff:ff to use a broadcast frame. In station mode, the address can be anything, e.g., the current BSSID. It should be noted that this functionality works correctly only when associated and using TKIP. Signed-off-by: Jouni Malinen <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-03mac80211: add HW flag for disabling auto link-PS in AP modeArik Nemtsov1-1/+53
When operating in AP mode the wl1271 hardware filters out null-data packets as well as management packets. This makes it impossible for mac80211 to monitor the PS mode by using the PM bit of incoming frames. Implement a HW flag to indicate that mac80211 should ignore the PM bit. In addition, expose ieee80211_sta_ps_transition() to make low-level drivers capable of controlling PS-mode. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-03Merge branch 'master' of ↵David S. Miller1-0/+25
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2011-02-02tcp: Increase the initial congestion window to 10.David S. Miller1-9/+3
Signed-off-by: David S. Miller <[email protected]> Acked-by: Nandita Dukkipati <[email protected]>
2011-02-02Merge branch 'master' of ↵David S. Miller1-3/+0
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6