summaryrefslogtreecommitdiffstats
path: root/src/security.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-05 09:13:14 -0800
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-05 09:13:14 -0800
commit7b4c5a0746b638ad050ff9dc1bd4a3b0f64157d9 (patch)
treeedd589ef7c51f7c9d33424899a3acc704312aa4f /src/security.c
parent9058ff217368248eba552b8c7b7df533887f7aa3 (diff)
Add missing check for invalid auth requirements value
Diffstat (limited to 'src/security.c')
-rw-r--r--src/security.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/security.c b/src/security.c
index e9a86ab5..ea63b3c9 100644
--- a/src/security.c
+++ b/src/security.c
@@ -328,7 +328,8 @@ static void link_key_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
/* Don't use debug link keys (0x03) and also don't use
* unauthenticated combination keys if MITM is required */
- if (type == 0x03 || (type == 0x04 && (req.type & 0x01)))
+ if (type == 0x03 || (type == 0x04 && req.type != 0xff &&
+ (req.type & 0x01)))
hci_send_cmd(dev, OGF_LINK_CTL,
OCF_LINK_KEY_NEG_REPLY, 6, dba);
else