* [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
* RE: [PATCH] Bluetooth: mesh: Correct segmentation logic
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
1 sibling, 0 replies; 3+ messages in thread
From: Gix, Brian @ 2017-10-11 19:10 UTC (permalink / raw)
To: Steve Brown, linux-bluetooth@vger.kernel.org
Cc: Luiz Augusto von Dentz, marcel@holtmann.org, Hedberg, Johan
Hi Luiz, Marcel, Johan:
This is a legitimate and important fix. Please apply ASAP.
> -----Original Message-----
> From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-
> owner@vger.kernel.org] On Behalf Of Steve Brown
> Sent: Wednesday, October 11, 2017 12:06 PM
> To: linux-bluetooth@vger.kernel.org
> Subject: [PATCH] Bluetooth: mesh: Correct segmentation logic
>
> 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)) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: mesh: Correct segmentation logic
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
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2017-10-11 19:21 UTC (permalink / raw)
To: Steve Brown; +Cc: linux-bluetooth
Hi Steve,
On Wed, Oct 11, 2017, Steve Brown wrote:
> 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)) {
Applied, thanks.
Johan
^ permalink raw reply [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).