linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: mesh: Correct segmentation logic
@ 2017-10-11 19:06 Steve Brown
  2017-10-11 19:10 ` Gix, Brian
  2017-10-11 19:21 ` Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Brown @ 2017-10-11 19:06 UTC (permalink / raw)
  To: linux-bluetooth

The decision whether to segment or not didn't consider the size of the MIC

diff --git a/mesh/net.c b/mesh/net.c
index 2d75c4f7d..96e82fe1c 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -2098,7 +2098,7 @@ bool net_access_layer_send(uint8_t ttl, uint16_t src, uint32_t dst,
 	if (!result)
 		return false;
 
-	segN = SEG_MAX(len);
+	segN = SEG_MAX(len + sizeof(uint32_t));
 
 	/* Only one ACK required SAR message per destination at a time */
 	if (segN && IS_UNICAST(dst)) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-11 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11 19:06 [PATCH] Bluetooth: mesh: Correct segmentation logic Steve Brown
2017-10-11 19:10 ` Gix, Brian
2017-10-11 19:21 ` 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).