Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Set auth method to just works for no mitm and displayonly
@ 2018-02-16 13:30 Grzegorz Kolodziejczyk
  2018-02-16 15:54 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Grzegorz Kolodziejczyk @ 2018-02-16 13:30 UTC (permalink / raw)
  To: linux-bluetooth

Don't bother user space with no input capabilities with confirmation
request.

> ACL Data RX: Handle 3585 flags 0x02 dlen 11
      SMP: Pairing Request (0x01) len 6
        IO capability: KeyboardDisplay (0x04)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, No MITM, Legacy, No Keypresses (0x01)
        Max encryption key size: 16
        Initiator key distribution: EncKey IdKey Sign (0x07)
        Responder key distribution: EncKey IdKey Sign (0x07)
> HCI Event: LE Meta Event (0x3e) plen 12
      LE Read Remote Used Features (0x04)
        Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a)
        Handle: 3585
        Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< ACL Data TX: Handle 3585 flags 0x00 dlen 16
        LE L2CAP: Connection Parameter Update Request (0x12) ident 1 len 8
        Min interval: 24
        Max interval: 40
        Slave latency: 0
        Timeout multiplier: 2000
@ MGMT Event: User Confirmation Request (0x000f) plen 12
        LE Address: 4E:29:AB:D8:25:39 (Resolvable)
        Confirm hint: 0x01
        Value: 0x00000000
< ACL Data TX: Handle 3585 flags 0x00 dlen 11
      SMP: Pairing Response (0x02) len 6
        IO capability: DisplayOnly (0x00)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, No MITM, Legacy, No Keypresses (0x01)
        Max encryption key size: 16
        Initiator key distribution: EncKey IdKey Sign (0x07)
        Responder key distribution: EncKey Sign (0x05)

Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
---
 net/bluetooth/smp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index ede1a68098f1..cac56153b7b5 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -893,7 +893,8 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
 
 	/* Don't bother user space with no IO capabilities */
 	if (smp->method == JUST_CFM &&
-	    hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT)
+	    (hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT ||
+	    hcon->io_capability == HCI_IO_DISPLAY_ONLY))
 		smp->method = JUST_WORKS;
 
 	/* If Just Works, Continue with Zero TK */
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-25 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-16 13:30 [PATCH] Bluetooth: Set auth method to just works for no mitm and displayonly Grzegorz Kolodziejczyk
2018-02-16 15:54 ` Marcel Holtmann
2018-02-25 18:31   ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox