* [PATCH v2] pand: Fix for TP_BNEP_CTRL_BV_01_C qualification test
@ 2011-03-04 18:41 Lukasz Rymanowski
2011-03-10 8:52 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Rymanowski @ 2011-03-04 18:41 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Lukasz Rymanowski
With this fix pand will correctly respond on
unknown BNEP control command
---
compat/bnep.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/compat/bnep.c b/compat/bnep.c
index 24bf7e3..99b3ecb 100644
--- a/compat/bnep.c
+++ b/compat/bnep.c
@@ -231,6 +231,22 @@ int bnep_accept_connection(int sk, uint16_t role, char *dev)
return -1;
req = (void *) pkt;
+
+ /*
+ * Highest known Control command ID
+ * is BNEP_FILTER_MULT_ADDR_RSP = 0x06
+ */
+ if (req->type == BNEP_CONTROL &&
+ req->ctrl > BNEP_FILTER_MULT_ADDR_RSP) {
+ uint8_t pkt[3];
+ pkt[0] = BNEP_CONTROL;
+ pkt[1] = BNEP_CMD_NOT_UNDERSTOOD;
+ pkt[2] = req->ctrl;
+
+ send(sk, pkt, sizeof(*pkt), 0);
+ return -1;
+ }
+
if (req->type != BNEP_CONTROL || req->ctrl != BNEP_SETUP_CONN_REQ)
return -1;
--
1.7.0.4
On behalf ST-Ericsson
/Lukasz
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] pand: Fix for TP_BNEP_CTRL_BV_01_C qualification test
2011-03-04 18:41 [PATCH v2] pand: Fix for TP_BNEP_CTRL_BV_01_C qualification test Lukasz Rymanowski
@ 2011-03-10 8:52 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-03-10 8:52 UTC (permalink / raw)
To: Lukasz Rymanowski; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl, henrik.possung
Hi Lukasz,
On Fri, Mar 04, 2011, Lukasz Rymanowski wrote:
> With this fix pand will correctly respond on
> unknown BNEP control command
> ---
> compat/bnep.c | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
Pushed upstream. Could you also create a matching patch for the network
plugin, please? (network/server.c bnep_setup function).
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-10 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 18:41 [PATCH v2] pand: Fix for TP_BNEP_CTRL_BV_01_C qualification test Lukasz Rymanowski
2011-03-10 8:52 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).