* [PATCH BlueZ v1] l2test: Attempt to update BT_SNDMTU/omtu when using -D
@ 2026-03-04 17:59 Luiz Augusto von Dentz
2026-03-04 18:55 ` [BlueZ,v1] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2026-03-04 17:59 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attempts to update the omtu using getsockopt(BT_SNDMTU) since it
can be updated after the initial connection and there are tests such
L2CAP/ECFC/BV-23-C that attempts to check that the updated MTU is used.
Fixes: https://github.com/bluez/bluez/issues/1941
---
tools/l2test.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/l2test.c b/tools/l2test.c
index aa05f5247c5e..48fff715f23b 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -957,6 +957,7 @@ static void do_send(int sk)
{
uint32_t seq;
int i, fd, len, buflen, size, sent;
+ socklen_t optlen;
syslog(LOG_INFO, "Sending ...");
@@ -1021,8 +1022,15 @@ static void do_send(int sk)
}
if (num_frames && send_delay && count &&
- !(seq % (count + seq_start)))
+ !(seq % (count + seq_start))) {
usleep(send_delay);
+ /* Attempt to update the BT_SNDMTU/omtu */
+ if (getsockopt(sk, SOL_BLUETOOTH, BT_SNDMTU, &omtu,
+ &optlen) < 0)
+ syslog(LOG_ERR,
+ "getsockopt(BT_SNDMTU): %s (%d)",
+ strerror(errno), errno);
+ }
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-04 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 17:59 [PATCH BlueZ v1] l2test: Attempt to update BT_SNDMTU/omtu when using -D Luiz Augusto von Dentz
2026-03-04 18:55 ` [BlueZ,v1] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox