Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] shared/att: Fix responding to unknown command opcode
@ 2017-04-26 14:19 Luiz Augusto von Dentz
  2017-04-26 14:49 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2017-04-26 14:19 UTC (permalink / raw)
  To: linux-bluetooth

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


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

end of thread, other threads:[~2017-04-27 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-26 14:19 [PATCH BlueZ] shared/att: Fix responding to unknown command opcode Luiz Augusto von Dentz
2017-04-26 14:49 ` Marcel Holtmann
2017-04-27 13:02   ` Luiz Augusto von Dentz

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