From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] shared/att: Fix responding to unknown command opcode
Date: Wed, 26 Apr 2017 17:19:17 +0300 [thread overview]
Message-ID: <20170426141917.9727-1-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In case of receiving an unknown command no response shall be generated.
---
src/shared/att.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/att.c b/src/shared/att.c
index 3071b51..10e182f 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -148,7 +148,7 @@ static enum att_op_type get_op_type(uint8_t opcode)
return att_opcode_type_table[i].type;
}
- return ATT_OP_TYPE_UNKNOWN;
+ return opcode & ATT_OP_CMD_MASK ? ATT_OP_TYPE_CMD : ATT_OP_TYPE_UNKNOWN;
}
static const struct {
--
2.9.3
next reply other threads:[~2017-04-26 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 14:19 Luiz Augusto von Dentz [this message]
2017-04-26 14:49 ` [PATCH BlueZ] shared/att: Fix responding to unknown command opcode Marcel Holtmann
2017-04-27 13:02 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170426141917.9727-1-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox