From: Szymon Janc Date: Tue, 20 Nov 2012 10:38:54 +0000 (+0100) Subject: Bluetooth: Remove OOB data if device was discovered in band X-Git-Tag: next-20121205~78^2~57^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2b2fec4d08a0aabe20d2e749cb7978f04217af65;p=karo-tx-linux.git Bluetooth: Remove OOB data if device was discovered in band 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 Acked-by: Johan Hedberg Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e3a49db9cfcb..81f4bac098c9 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -434,6 +434,8 @@ bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, BT_DBG("cache %p, %pMR", cache, &data->bdaddr); + hci_remove_remote_oob_data(hdev, &data->bdaddr); + if (ssp) *ssp = data->ssp_mode;