From: Konstantin Forostyan <konstantin.forostyan@peiker-cee.de>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: bluetooth: If unknown option in L2CAP Configuration Request is a hint, Bluetooth stack responds with "Command Reject" instead of "Configuration Response"
Date: Tue, 28 Jan 2020 13:27:21 +0000 [thread overview]
Message-ID: <3020b8d0c7d39428aec573153b3c3414213be7ce.camel@peiker-cee.de> (raw)
Hello community,
It seems that there's a bug in Bluetooth stack of 4.20 kernel. I
discovered it during Bluetooth qualification tests. L2CAP/COS/CFD/BV-
12-C [Unknown Option Response] test fails because instead of
"Configuration Response" with error code 0x0003 "unknown option" the
Bluetooth stack generates "Command Reject".
I think, this happens because the tester (Bluetooth SIG PTS) uses hints
as unknown options, and the Bluetooth stack has special handling for
hints.
I made a small patch in order to overcome this problem. Please confirm,
that the patch is feasible. If not, please suggest how to fix the
"Command Reject" problem.
Thank you and best regards,
Konstantin
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3381,11 +3381,11 @@
break;
default:
- if (hint)
- break;
-
result = L2CAP_CONF_UNKNOWN;
- *((u8 *) ptr++) = type;
+
+ if (!hint)
+ *((u8 *) ptr++) = type;
+
break;
}
}
next reply other threads:[~2020-01-28 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 13:27 Konstantin Forostyan [this message]
2020-01-29 3:56 ` bluetooth: If unknown option in L2CAP Configuration Request is a hint, Bluetooth stack responds with "Command Reject" instead of "Configuration Response" Marcel Holtmann
2020-01-29 8:53 ` Konstantin Forostyan
2020-01-29 9:01 ` Marcel Holtmann
2020-01-29 10:52 ` Konstantin Forostyan
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=3020b8d0c7d39428aec573153b3c3414213be7ce.camel@peiker-cee.de \
--to=konstantin.forostyan@peiker-cee.de \
--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;
as well as URLs for NNTP newsgroup(s).