You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/01/24 00:55:29 UTC
[3/3] incubator-mynewt-larva git commit: Impose maximum ATT MTU of
240.
Impose maximum ATT MTU of 240.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/044d34ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/044d34ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/044d34ad
Branch: refs/heads/master
Commit: 044d34ad3bb49bab2dd342e095eb2712aee22aab
Parents: b3d21e4
Author: Christopher Collins <cc...@gmail.com>
Authored: Sat Jan 23 15:54:42 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Sat Jan 23 15:54:42 2016 -0800
----------------------------------------------------------------------
net/nimble/host/src/ble_att.c | 3 +++
net/nimble/host/src/ble_att_priv.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/044d34ad/net/nimble/host/src/ble_att.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att.c b/net/nimble/host/src/ble_att.c
index d7b79f8..f301a76 100644
--- a/net/nimble/host/src/ble_att.c
+++ b/net/nimble/host/src/ble_att.c
@@ -133,6 +133,9 @@ ble_att_set_preferred_mtu(uint16_t mtu)
if (mtu < BLE_ATT_MTU_DFLT) {
return BLE_HS_EINVAL;
}
+ if (mtu > BLE_ATT_MTU_MAX) {
+ return BLE_HS_EINVAL;
+ }
ble_att_preferred_mtu = mtu;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/044d34ad/net/nimble/host/src/ble_att_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_priv.h b/net/nimble/host/src/ble_att_priv.h
index 9c04379..f21cd81 100644
--- a/net/nimble/host/src/ble_att_priv.h
+++ b/net/nimble/host/src/ble_att_priv.h
@@ -39,7 +39,7 @@ struct ble_att_notify_req;
struct ble_att_indicate_req;
#define BLE_ATT_MTU_DFLT 23 /* Also the minimum. */
-#define BLE_ATT_MTU_MAX 256 /* XXX: I'm making this up! */
+#define BLE_ATT_MTU_MAX 240 /* XXX: Temporary to prevent mbuf bugs. */
struct ble_att_prep_entry {
SLIST_ENTRY(ble_att_prep_entry) bape_next;