diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-01-04 08:40:05 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-07 22:40:06 -0500 |
commit | 03b555e119de8288a16e086e1fbd223d9b429d3d (patch) | |
tree | 5f0dd5efc8439ba4300761bc9ebba22c3d718c06 /include | |
parent | 930e13363fb0e94db6e8b59c54dfb5c59355113e (diff) |
Bluetooth: Reject pairing requests when in non-pairable mode
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 <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci.h | 14 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index f0c25b5ba4b2..65cab137e19f 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -384,6 +384,12 @@ struct hci_cp_reject_sync_conn_req { | |||
384 | __u8 reason; | 384 | __u8 reason; |
385 | } __packed; | 385 | } __packed; |
386 | 386 | ||
387 | #define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434 | ||
388 | struct hci_cp_io_capability_neg_reply { | ||
389 | bdaddr_t bdaddr; | ||
390 | __u8 reason; | ||
391 | } __packed; | ||
392 | |||
387 | #define HCI_OP_SNIFF_MODE 0x0803 | 393 | #define HCI_OP_SNIFF_MODE 0x0803 |
388 | struct hci_cp_sniff_mode { | 394 | struct hci_cp_sniff_mode { |
389 | __le16 handle; | 395 | __le16 handle; |
@@ -840,6 +846,14 @@ struct hci_ev_io_capa_request { | |||
840 | bdaddr_t bdaddr; | 846 | bdaddr_t bdaddr; |
841 | } __packed; | 847 | } __packed; |
842 | 848 | ||
849 | #define HCI_EV_IO_CAPA_REPLY 0x32 | ||
850 | struct hci_ev_io_capa_reply { | ||
851 | bdaddr_t bdaddr; | ||
852 | __u8 capability; | ||
853 | __u8 oob_data; | ||
854 | __u8 authentication; | ||
855 | } __packed; | ||
856 | |||
843 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 | 857 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 |
844 | struct hci_ev_simple_pair_complete { | 858 | struct hci_ev_simple_pair_complete { |
845 | __u8 status; | 859 | __u8 status; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 8ee0b8bac77c..dc8084a139ed 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -201,6 +201,10 @@ struct hci_conn { | |||
201 | __u16 disc_timeout; | 201 | __u16 disc_timeout; |
202 | unsigned long pend; | 202 | unsigned long pend; |
203 | 203 | ||
204 | __u8 remote_cap; | ||
205 | __u8 remote_oob; | ||
206 | __u8 remote_auth; | ||
207 | |||
204 | unsigned int sent; | 208 | unsigned int sent; |
205 | 209 | ||
206 | struct sk_buff_head data_q; | 210 | struct sk_buff_head data_q; |