1. 21 3月, 2014 1 次提交
    • J
      Bluetooth: Fix address value for early disconnection events · 61b1a7fb
      Johan Hedberg 提交于
      We need to ensure that we do not send events to user space with the
      identity address if we have not yet notified user space of the IRK. The
      code was previously trying to handle this for the mgmt_pair_device
      response (which worked well enough) but this is not the only connection
      related event that might be sent to user space before pairing is
      successful: another important event is Device Disconnected.
      
      The issue can actually be solved more simply than the solution
      previously used for mgmt_pair_device. Since we do have the identity
      address tracked as part of the remote IRK struct we can just copy it
      over from there to the hci_conn struct once we've for real sent the mgmt
      event for the new IRK.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      61b1a7fb
  2. 20 3月, 2014 3 次提交
  3. 19 3月, 2014 3 次提交
  4. 15 3月, 2014 1 次提交
  5. 13 3月, 2014 1 次提交
  6. 10 3月, 2014 2 次提交
  7. 01 3月, 2014 2 次提交
  8. 28 2月, 2014 3 次提交
  9. 27 2月, 2014 3 次提交
  10. 26 2月, 2014 1 次提交
    • J
      Bluetooth: Ignore IRKs with no Identity Address · a9a58f86
      Johan Hedberg 提交于
      The Core Specification (4.1) leaves room for sending an SMP Identity
      Address Information PDU with an all-zeros BD_ADDR value. This
      essentially means that we would not have an Identity Address for the
      device and the only means of identifying it would be the IRK value
      itself.
      
      Due to lack of any known implementations behaving like this it's best to
      keep our implementation as simple as possible as far as handling such
      situations is concerned. This patch updates the Identity Address
      Information handler function to simply ignore the IRK received from such
      a device.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a9a58f86
  11. 24 2月, 2014 2 次提交
  12. 23 2月, 2014 2 次提交
  13. 20 2月, 2014 3 次提交
  14. 19 2月, 2014 5 次提交
  15. 18 2月, 2014 5 次提交
  16. 13 2月, 2014 2 次提交
    • J
      Bluetooth: Fix differentiating stored master vs slave LTK types · 98a0b845
      Johan Hedberg 提交于
      If LTK distribution happens in both directions we will have two LTKs for
      the same remote device: one which is used when we're connecting as
      master and another when we're connecting as slave. When looking up LTKs
      from the locally stored list we shouldn't blindly return the first match
      but also consider which type of key is in question. If we do not do this
      we may end up selecting an incorrect encryption key for a connection.
      
      This patch fixes the issue by always specifying to the LTK lookup
      functions whether we're looking for a master or a slave key.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      98a0b845
    • J
      Bluetooth: Enable LTK distribution to slave devices · 0cf73b9f
      Johan Hedberg 提交于
      So far we've only been requesting the LTK to be distributed to the
      master (initiator) of pairing, which is usually enough since it's the
      master that will establish future connections and initiate encryption.
      However, in the case that both devices support switching to the opposing
      role (which seems to be increasingly common) pairing will have to
      performed again since the "new" master will not have all information.
      
      As there is no real harm in it, this patch updates the code to always
      try distributing the LTK also to the slave device, thereby enabling role
      switches for future connections.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Acked-by: NVinicius Gomes <vcgomes@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      0cf73b9f
  17. 05 12月, 2013 1 次提交