linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dylan Taft <dylanetaft@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: Odd l2cap_sock.c Code?
Date: Sun, 11 Nov 2018 22:43:15 -0500	[thread overview]
Message-ID: <CAKz1w-kFDGH-zfYu1GjoJqfs+9uvHvxnG=qwgj8EscAidDNd1w@mail.gmail.com> (raw)
In-Reply-To: <CAKz1w-==yXd4EL39ULE6bcYU3fTpZB9D0EqdgRhq4L38kVzYEg@mail.gmail.com>

Sorry, I went cross-eyed looking at setsockopt\getsockopt.  Both the
new code and old code do not allow it if the socket is connected, but
the Bluetooth spec does it looks.  Is the only option on receiving an
MTU REQ to drop the connection and re-open with a lower MTU?
It looks like this in an hcidump, what I am referring to.  That MTU is
lower than the default of 672.  The spec says not dealing with it
could lead to problems.  Could the MTU specifically be allowed to be
set on an open socket to no ill effect in the kernel?

< HCI Command: LE Create Connection (0x08|0x000d) plen 25
    bdaddr 00:0B:57:7F:72:BF type 0
    interval 96 window 96 initiator_filter 0
    own_bdaddr_type 0 min_interval 24 max_interval 40
    latency 0 supervision_to 42 min_ce 0 max_ce 0
> HCI Event: Command Status (0x0f) plen 4
    LE Create Connection (0x08|0x000d) status 0x00 ncmd 1
> HCI Event: LE Meta Event (0x3e) plen 19
    LE Connection Complete
      status 0x00 handle 74, role master
      bdaddr 00:0B:57:7F:72:BF (Public)
> ACL data: handle 74 flags 0x02 dlen 7
    ATT: MTU req (0x02)
      client rx mtu 247

  reply	other threads:[~2018-11-12  3:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  3:14 Odd l2cap_sock.c Code? Dylan Taft
2018-11-12  3:43 ` Dylan Taft [this message]
2018-11-12  5:25   ` Dylan Taft
2018-11-12  9:51     ` 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='CAKz1w-kFDGH-zfYu1GjoJqfs+9uvHvxnG=qwgj8EscAidDNd1w@mail.gmail.com' \
    --to=dylanetaft@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;
as well as URLs for NNTP newsgroup(s).