Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 1/2] Bluetooth: Fix RFCOMM NSC response
Date: Wed, 15 Oct 2014 15:56:57 +0200	[thread overview]
Message-ID: <20141015135657.GA24545@t440s.fdxtended.com> (raw)
In-Reply-To: <1413193434-16779-1-git-send-email-szymon.janc@tieto.com>

Hi Szymon,

On Mon, Oct 13, 2014, Szymon Janc wrote:
> rfcomm_send_nsc expects CR to be either 0 or 1 since it is later
> passed to __mcc_type macro and shitfed. Unfortunatelly CR extracted
> from received frame type was not sanitized and shifted value was passed
> resulting in bogus response.
> 
> Note: shifted value was also passed to other functions but was used
> only in if satements so this bug appears only for NSC case.
> 
> The CR bit in the value octet shall be set to the same value
> as the CR bit in the type field octet of the not supported command
> frame but the CR bit for NCS response should be set to 0 since it is
> always a response.
> 
> This was affecting TC_RFC_BV_25_C PTS qualification test.
> 
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> 
> V3: fixed invalid CR
> V2: moved sanitization to macro ifself
>     added second patch that also fix __test_pf 
> 
>  net/bluetooth/rfcomm/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Both of these patches have been applied to bluetooth-next. Thanks.

Johan

      parent reply	other threads:[~2014-10-15 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13  9:43 [PATCH v3 1/2] Bluetooth: Fix RFCOMM NSC response Szymon Janc
2014-10-13  9:43 ` [PATCH v3 2/2] Bluetooth: Improve RFCOMM __test_pf macro robustness Szymon Janc
2014-10-15 13:56 ` Johan Hedberg [this message]

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=20141015135657.GA24545@t440s.fdxtended.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=szymon.janc@tieto.com \
    /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