From: Johan Hedberg Date: Tue, 9 Sep 2014 23:21:46 +0000 (-0700) Subject: Bluetooth: Fix allowing SMP Signing info PDU X-Git-Tag: v6.6-pxa1908~22484^2~144^2~49^2~9 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=196332f5a1e5c3ec7171742fce83d03795abf120;p=linux.git Bluetooth: Fix allowing SMP Signing info PDU If the remote side is not distributing its IRK but is distributing the CSRK the next PDU after master identification is the Signing Information. This patch fixes a missing SMP_ALLOW_CMD() for this in the smp_cmd_master_ident() function. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 25c9040e0b12..dc575aba2e65 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -1324,6 +1324,8 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb) SMP_DISALLOW_CMD(smp, SMP_CMD_MASTER_IDENT); if (smp->remote_key_dist & SMP_DIST_ID_KEY) SMP_ALLOW_CMD(smp, SMP_CMD_IDENT_INFO); + else if (smp->remote_key_dist & SMP_DIST_SIGN) + SMP_ALLOW_CMD(smp, SMP_CMD_SIGN_INFO); skb_pull(skb, sizeof(*rp));