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/05/05 02:46:41 UTC
[1/4] incubator-mynewt-core git commit: BLE host - indicate correct
peer addr type in pair
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 2a4c415c8 -> 8051041b8
BLE host - indicate correct peer addr type in pair
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/4fa4d634
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4fa4d634
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4fa4d634
Branch: refs/heads/develop
Commit: 4fa4d63402e0cf4c7ac88e38bce51ee442b5e217
Parents: 2a4c415
Author: Christopher Collins <cc...@apache.org>
Authored: Wed May 4 19:05:41 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed May 4 19:05:41 2016 -0700
----------------------------------------------------------------------
net/nimble/host/src/ble_gap.c | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4fa4d634/net/nimble/host/src/ble_gap.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap.c b/net/nimble/host/src/ble_gap.c
index 5435f56..0636e05 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -838,6 +838,7 @@ ble_gap_rx_conn_complete(struct hci_le_conn_complete *evt)
conn->bhc_handle = evt->connection_handle;
memcpy(conn->bhc_addr, evt->peer_addr, sizeof conn->bhc_addr);
+ conn->bhc_addr_type = evt->peer_addr_type;
conn->bhc_itvl = evt->conn_itvl;
conn->bhc_latency = evt->conn_latency;
conn->bhc_supervision_timeout = evt->supervision_timeout;
[4/4] incubator-mynewt-core git commit: BLE host - Add BLE_GAP_
prefix to passkey actions.
Posted by cc...@apache.org.
BLE host - Add BLE_GAP_ prefix to passkey actions.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8051041b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8051041b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8051041b
Branch: refs/heads/develop
Commit: 8051041b8412d28cd13a6f44c2c96fb523dbafb8
Parents: 0b42e39
Author: Christopher Collins <cc...@apache.org>
Authored: Wed May 4 19:46:09 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed May 4 19:46:09 2016 -0700
----------------------------------------------------------------------
apps/bletiny/src/cmd.c | 6 +--
net/nimble/host/include/host/ble_gap.h | 8 ++--
net/nimble/host/src/ble_l2cap_sm.c | 59 +++++++++++++++++------------
3 files changed, 41 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8051041b/apps/bletiny/src/cmd.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/cmd.c b/apps/bletiny/src/cmd.c
index b5c905d..458c1ca 100644
--- a/apps/bletiny/src/cmd.c
+++ b/apps/bletiny/src/cmd.c
@@ -1534,8 +1534,8 @@ cmd_passkey(int argc, char **argv)
}
switch(pk.action) {
- case PKACT_INPUT:
- case PKACK_GEN_DISP:
+ case BLE_GAP_PKACT_INPUT:
+ case BLE_GAP_PKACT_DISP:
/* passkey is 6 digit number */
pk.passkey = parse_arg_long_bounds("key", 0, 999999, &rc);
if (rc != 0) {
@@ -1543,7 +1543,7 @@ cmd_passkey(int argc, char **argv)
}
break;
- case PKACT_OOB:
+ case BLE_GAP_PKACT_OOB:
rc = parse_arg_byte_stream_exact_length("oob", pk.oob, 16);
if (rc != 0) {
return rc;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8051041b/net/nimble/host/include/host/ble_gap.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gap.h b/net/nimble/host/include/host/ble_gap.h
index 9dcba86..3e5b677 100644
--- a/net/nimble/host/include/host/ble_gap.h
+++ b/net/nimble/host/include/host/ble_gap.h
@@ -140,10 +140,10 @@ struct ble_gap_sec_params {
* application must pass the passkey back to the l2cap via
* ble_l2cap_sm_set_tk
*/
- #define PKACT_NONE 0
- #define PKACT_OOB 1
- #define PKACT_INPUT 2
- #define PKACK_GEN_DISP 3
+#define BLE_GAP_PKACT_NONE 0
+#define BLE_GAP_PKACT_OOB 1
+#define BLE_GAP_PKACT_INPUT 2
+#define BLE_GAP_PKACT_DISP 3
struct ble_gap_passkey_action {
uint8_t action;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8051041b/net/nimble/host/src/ble_l2cap_sm.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_sm.c b/net/nimble/host/src/ble_l2cap_sm.c
index bafaaa6..e6957a1 100644
--- a/net/nimble/host/src/ble_l2cap_sm.c
+++ b/net/nimble/host/src/ble_l2cap_sm.c
@@ -670,26 +670,35 @@ ble_l2cap_sm_random_handle(struct ble_l2cap_sm_proc *proc,
* $confirm *
*****************************************************************************/
+/**
+ * Create some shortened names for the passkey actions so that the table is
+ * easier to read.
+ */
+#define PKACT_NONE BLE_GAP_PKACT_NONE
+#define PKACT_OOB BLE_GAP_PKACT_OOB
+#define PKACT_INPUT BLE_GAP_PKACT_INPUT
+#define PKACT_DISP BLE_GAP_PKACT_DISP
+
/* This is the initiator passkey action action dpeneding on the io
* capabilties of both parties
*/
static const uint8_t initiator_pkact[5 /*init*/ ][5 /*resp */] =
{
- {PKACT_NONE, PKACT_NONE, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
- {PKACT_NONE, PKACT_NONE, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
- {PKACK_GEN_DISP, PKACK_GEN_DISP, PKACT_INPUT, PKACT_NONE, PKACK_GEN_DISP},
- {PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE},
- {PKACK_GEN_DISP, PKACK_GEN_DISP, PKACK_GEN_DISP, PKACT_NONE, PKACK_GEN_DISP},
+ {PKACT_NONE, PKACT_NONE, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
+ {PKACT_NONE, PKACT_NONE, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
+ {PKACT_DISP, PKACT_DISP, PKACT_INPUT, PKACT_NONE, PKACT_DISP},
+ {PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE},
+ {PKACT_DISP, PKACT_DISP, PKACT_DISP, PKACT_NONE, PKACT_DISP},
};
/* This is the initiator passkey action action depending on the io
* capabilities of both parties */
static const uint8_t responder_pkact[5 /*init*/ ][5 /*resp */] =
{
- {PKACT_NONE, PKACT_NONE, PKACK_GEN_DISP, PKACT_NONE, PKACK_GEN_DISP},
- {PKACT_NONE, PKACT_NONE, PKACK_GEN_DISP, PKACT_NONE, PKACK_GEN_DISP},
- {PKACT_INPUT, PKACT_INPUT, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
- {PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE},
+ {PKACT_NONE, PKACT_NONE, PKACT_DISP, PKACT_NONE, PKACT_DISP},
+ {PKACT_NONE, PKACT_NONE, PKACT_DISP, PKACT_NONE, PKACT_DISP},
+ {PKACT_INPUT, PKACT_INPUT, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
+ {PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE},
{PKACT_INPUT, PKACT_INPUT, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
};
@@ -701,15 +710,15 @@ ble_l2cap_sm_passkey_action(struct ble_l2cap_sm_proc *proc)
/* if both OOB set, then its OOB */
if(proc->pair_req.oob_data_flag && proc->pair_rsp.oob_data_flag) {
- action = PKACT_OOB;
+ action = BLE_GAP_PKACT_OOB;
}
/* if neither MITM is set, then its just works */
else if(((proc->pair_req.authreq | proc->pair_rsp.authreq) & 0x04) == 0) {
- action = PKACT_NONE;
+ action = BLE_GAP_PKACT_NONE;
}
/* what to do if this in in error */
else if ((proc->pair_req.io_cap >= 5) || (proc->pair_rsp.io_cap >= 5)) {
- action = PKACT_NONE;
+ action = BLE_GAP_PKACT_NONE;
}
/* check io_cap */
else if (proc->flags & BLE_L2CAP_SM_PROC_F_INITIATOR) {
@@ -720,16 +729,16 @@ ble_l2cap_sm_passkey_action(struct ble_l2cap_sm_proc *proc)
/* set some state for the application */
switch(action) {
- case PKACT_NONE:
+ case BLE_GAP_PKACT_NONE:
proc->pair_alg = BLE_L2CAP_SM_PAIR_ALG_JW;
proc->flags &= ~BLE_L2CAP_SM_PROC_F_AUTHENTICATED;
break;
- case PKACT_OOB:
+ case BLE_GAP_PKACT_OOB:
proc->pair_alg = BLE_L2CAP_SM_PAIR_ALG_OOB;
proc->flags |= BLE_L2CAP_SM_PROC_F_AUTHENTICATED;
break;
- case PKACT_INPUT:
- case PKACK_GEN_DISP:
+ case BLE_GAP_PKACT_INPUT:
+ case BLE_GAP_PKACT_DISP:
proc->pair_alg = BLE_L2CAP_SM_PAIR_ALG_PASSKEY;
proc->flags |= BLE_L2CAP_SM_PROC_F_AUTHENTICATED;
break;
@@ -835,7 +844,7 @@ ble_l2cap_sm_confirm_handle(struct ble_l2cap_sm_proc *proc,
} else {
proc->flags |= BLE_L2CAP_SM_PROC_F_RX_CONFIRM;
/* if there is no passkey action or if we already got the passkey */
- if((ble_l2cap_sm_passkey_action(proc) == PKACT_NONE) ||
+ if((ble_l2cap_sm_passkey_action(proc) == BLE_GAP_PKACT_NONE) ||
(proc->flags & BLE_L2CAP_SM_PROC_F_TK_VALID))
{
rc = ble_l2cap_sm_confirm_go(proc);
@@ -942,7 +951,7 @@ ble_l2cap_sm_pair_rsp_handle(struct ble_l2cap_sm_proc *proc,
/* if there is no passkey action to take, just continue with confirm */
*passkey_action = ble_l2cap_sm_passkey_action(proc);
- if(*passkey_action == PKACT_NONE) {
+ if(*passkey_action == BLE_GAP_PKACT_NONE) {
rc = ble_l2cap_sm_confirm_go(proc);
if (rc != 0) {
*out_sm_status = BLE_L2CAP_SM_ERR_UNSPECIFIED;
@@ -965,7 +974,7 @@ ble_l2cap_sm_rx_pair_req(uint16_t conn_handle, uint8_t state,
struct ble_l2cap_sm_proc *proc;
struct ble_l2cap_sm_proc *prev;
uint8_t sm_status;
- uint8_t passkey_action = PKACT_NONE;
+ uint8_t passkey_action = BLE_GAP_PKACT_NONE;
int rc;
@@ -1008,7 +1017,7 @@ ble_l2cap_sm_rx_pair_req(uint16_t conn_handle, uint8_t state,
ble_hs_unlock();
/* This has to be done after the unlock */
- if ( passkey_action != PKACT_NONE ) {
+ if ( passkey_action != BLE_GAP_PKACT_NONE ) {
ble_gap_passkey_event(proc->conn_handle,sm_status, passkey_action);
}
@@ -1025,7 +1034,7 @@ ble_l2cap_sm_rx_pair_rsp(uint16_t conn_handle, uint8_t state,
struct ble_l2cap_sm_proc *prev;
uint8_t sm_status;
int rc;
- uint8_t passkey_action = PKACT_NONE;
+ uint8_t passkey_action = BLE_GAP_PKACT_NONE;
rc = ble_hs_misc_pullup_base(om, BLE_L2CAP_SM_PAIR_CMD_SZ);
if (rc != 0) {
@@ -1052,7 +1061,7 @@ ble_l2cap_sm_rx_pair_rsp(uint16_t conn_handle, uint8_t state,
ble_hs_unlock();
/* This has to be done after the unlock */
- if ( passkey_action != PKACT_NONE ) {
+ if ( passkey_action != BLE_GAP_PKACT_NONE ) {
ble_gap_passkey_event(proc->conn_handle,sm_status, passkey_action);
}
@@ -1355,13 +1364,13 @@ ble_l2cap_sm_set_tk(uint16_t conn_handle, struct passkey_action *pkey)
/* Add the passkey range */
switch(pkey->action) {
- case PKACT_OOB:
+ case BLE_GAP_PKACT_OOB:
memcpy(proc->tk, pkey->oob, 16);
/* only a potential error */
sm_error = BLE_L2CAP_SM_ERR_OOB;
break;
- case PKACT_INPUT:
- case PKACK_GEN_DISP:
+ case BLE_GAP_PKACT_INPUT:
+ case BLE_GAP_PKACT_DISP:
if (pkey->passkey > 999999) {
/* return an error */
rc = BLE_L2CAP_SM_ERR_INVAL;
[2/4] incubator-mynewt-core git commit: BLE host: Return correct att
err for sec issues.
Posted by cc...@apache.org.
BLE host: Return correct att err for sec issues.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/fbe90aec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/fbe90aec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/fbe90aec
Branch: refs/heads/develop
Commit: fbe90aec020647f3e6d8f361dd20425e2409c149
Parents: 4fa4d63
Author: Christopher Collins <cc...@apache.org>
Authored: Wed May 4 19:08:48 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed May 4 19:08:48 2016 -0700
----------------------------------------------------------------------
net/nimble/host/include/host/ble_att.h | 1 +
net/nimble/host/include/host/ble_gatt.h | 3 +
net/nimble/host/src/ble_att_svr.c | 89 ++++++++++++++++++++++++----
net/nimble/host/src/ble_gatts.c | 11 +++-
4 files changed, 90 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fbe90aec/net/nimble/host/include/host/ble_att.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_att.h b/net/nimble/host/include/host/ble_att.h
index 6e6a02d..40fe616 100644
--- a/net/nimble/host/include/host/ble_att.h
+++ b/net/nimble/host/include/host/ble_att.h
@@ -31,6 +31,7 @@
#define BLE_ATT_ERR_READ_NOT_PERMITTED 0x02
#define BLE_ATT_ERR_WRITE_NOT_PERMITTED 0x03
#define BLE_ATT_ERR_INVALID_PDU 0x04
+#define BLE_ATT_ERR_INSUFFICIENT_AUTHENT 0x05
#define BLE_ATT_ERR_REQ_NOT_SUPPORTED 0x06
#define BLE_ATT_ERR_INVALID_OFFSET 0x07
#define BLE_ATT_ERR_PREPARE_QUEUE_FULL 0x09
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fbe90aec/net/nimble/host/include/host/ble_gatt.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gatt.h b/net/nimble/host/include/host/ble_gatt.h
index 73d73e5..7133fcb 100644
--- a/net/nimble/host/include/host/ble_gatt.h
+++ b/net/nimble/host/include/host/ble_gatt.h
@@ -166,6 +166,9 @@ typedef uint16_t ble_gatt_chr_flags;
#define BLE_GATT_CHR_F_AUTH_SIGN_WRITE 0x0040
#define BLE_GATT_CHR_F_RELIABLE_WRITE 0x0080
#define BLE_GATT_CHR_F_AUX_WRITE 0x0100
+#define BLE_GATT_CHR_F_ENC_REQ 0x0200
+#define BLE_GATT_CHR_F_AUTHEN_REQ 0x0400
+#define BLE_GATT_CHR_F_AUTHOR_REQ 0x0800
struct ble_gatt_chr_def {
uint8_t *uuid128; /* NULL if no more characteristics. */
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fbe90aec/net/nimble/host/src/ble_att_svr.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_svr.c b/net/nimble/host/src/ble_att_svr.c
index c64d6f9..757cd89 100644
--- a/net/nimble/host/src/ble_att_svr.c
+++ b/net/nimble/host/src/ble_att_svr.c
@@ -214,27 +214,90 @@ ble_att_svr_pullup_req_base(struct os_mbuf **om, int base_len,
}
static int
-ble_att_svr_read(uint16_t conn_handle, struct ble_att_svr_entry *entry,
- struct ble_att_svr_access_ctxt *ctxt, uint8_t *out_att_err)
+ble_att_svr_get_sec_params(uint16_t conn_handle,
+ struct ble_gap_sec_params *out_sec_params)
{
- uint8_t att_err;
+ struct ble_hs_conn *conn;
+
+ ble_hs_lock();
+ conn = ble_hs_conn_find(conn_handle);
+ if (conn != NULL) {
+ *out_sec_params = conn->bhc_sec_params;
+ }
+ ble_hs_unlock();
+
+ if (conn == NULL) {
+ return BLE_HS_ENOTCONN;
+ } else {
+ return 0;
+ }
+}
+
+static int
+ble_att_svr_check_security(uint16_t conn_handle,
+ struct ble_att_svr_entry *entry,
+ uint8_t *out_att_err)
+{
+ struct ble_gap_sec_params sec_params;
int rc;
- if (conn_handle != BLE_HS_CONN_HANDLE_NONE &&
- !(entry->ha_flags & HA_FLAG_PERM_READ)) {
+ if (!(entry->ha_flags & (HA_FLAG_ENC_REQ |
+ HA_FLAG_AUTHENTICATION_REQ |
+ HA_FLAG_AUTHORIZATION_REQ))) {
- att_err = BLE_ATT_ERR_READ_NOT_PERMITTED;
- rc = BLE_HS_ENOTSUP;
- goto err;
+ return 0;
}
- if (entry->ha_cb == NULL) {
- att_err = BLE_ATT_ERR_UNLIKELY;
- rc = BLE_HS_ENOTSUP;
- goto err;
+ rc = ble_att_svr_get_sec_params(conn_handle, &sec_params);
+ if (rc != 0) {
+ return rc;
}
- /* XXX: Check security. */
+ if (entry->ha_flags & HA_FLAG_ENC_REQ && !sec_params.enc_enabled) {
+ /* XXX: Check security database; if required key present, respond with
+ * insufficient encryption error code.
+ */
+ *out_att_err = BLE_ATT_ERR_INSUFFICIENT_AUTHENT;
+ return BLE_HS_ATT_ERR(*out_att_err);
+ }
+
+ if (entry->ha_flags & HA_FLAG_AUTHENTICATION_REQ &&
+ !sec_params.authenticated) {
+
+ *out_att_err = BLE_ATT_ERR_INSUFFICIENT_AUTHENT;
+ return BLE_HS_ATT_ERR(*out_att_err);
+ }
+
+ if (entry->ha_flags & HA_FLAG_AUTHORIZATION_REQ) {
+ /* XXX: Prompt user for authorization. */
+ }
+
+ return 0;
+}
+
+static int
+ble_att_svr_read(uint16_t conn_handle,
+ struct ble_att_svr_entry *entry,
+ struct ble_att_svr_access_ctxt *ctxt,
+ uint8_t *out_att_err)
+{
+ uint8_t att_err;
+ int rc;
+
+ att_err = 0; /* Silence gcc warning. */
+
+ if (conn_handle != BLE_HS_CONN_HANDLE_NONE) {
+ if (!(entry->ha_flags & HA_FLAG_PERM_READ)) {
+ att_err = BLE_ATT_ERR_READ_NOT_PERMITTED;
+ rc = BLE_HS_ENOTSUP;
+ goto err;
+ }
+
+ rc = ble_att_svr_check_security(conn_handle, entry, &att_err);
+ if (rc != 0) {
+ goto err;
+ }
+ }
BLE_HS_DBG_ASSERT(entry->ha_cb != NULL);
rc = entry->ha_cb(conn_handle, entry->ha_handle_id,
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fbe90aec/net/nimble/host/src/ble_gatts.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gatts.c b/net/nimble/host/src/ble_gatts.c
index 4ef5f21..cc252ca 100644
--- a/net/nimble/host/src/ble_gatts.c
+++ b/net/nimble/host/src/ble_gatts.c
@@ -151,6 +151,15 @@ ble_gatts_att_flags_from_chr_flags(ble_gatt_chr_flags chr_flags)
if (chr_flags & (BLE_GATT_CHR_F_WRITE_NO_RSP | BLE_GATT_CHR_F_WRITE)) {
att_flags |= HA_FLAG_PERM_WRITE;
}
+ if (chr_flags & BLE_GATT_CHR_F_ENC_REQ) {
+ att_flags |= HA_FLAG_ENC_REQ;
+ }
+ if (chr_flags & BLE_GATT_CHR_F_AUTHEN_REQ) {
+ att_flags |= HA_FLAG_AUTHENTICATION_REQ;
+ }
+ if (chr_flags & BLE_GATT_CHR_F_AUTHOR_REQ) {
+ att_flags |= HA_FLAG_AUTHORIZATION_REQ;
+ }
return att_flags;
}
@@ -642,7 +651,7 @@ ble_gatts_register_chr(const struct ble_gatt_chr_def *chr,
return rc;
}
- /* Register characteristic value attribute (cast away const on callback
+ /* Register characteristic value attribute (cast away const on callback
* arg).
*/
att_flags = ble_gatts_att_flags_from_chr_flags(chr->flags);
[3/4] incubator-mynewt-core git commit: BLE host - fix typo in
iocap-pairing tables.
Posted by cc...@apache.org.
BLE host - fix typo in iocap-pairing tables.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/0b42e392
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0b42e392
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0b42e392
Branch: refs/heads/develop
Commit: 0b42e392b23bc5d2abedd4558aa0c62d20007078
Parents: fbe90ae
Author: Christopher Collins <cc...@apache.org>
Authored: Wed May 4 19:36:41 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed May 4 19:36:41 2016 -0700
----------------------------------------------------------------------
net/nimble/host/src/ble_l2cap_sm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0b42e392/net/nimble/host/src/ble_l2cap_sm.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_sm.c b/net/nimble/host/src/ble_l2cap_sm.c
index 6eed99a..bafaaa6 100644
--- a/net/nimble/host/src/ble_l2cap_sm.c
+++ b/net/nimble/host/src/ble_l2cap_sm.c
@@ -679,7 +679,7 @@ static const uint8_t initiator_pkact[5 /*init*/ ][5 /*resp */] =
{PKACT_NONE, PKACT_NONE, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
{PKACK_GEN_DISP, PKACK_GEN_DISP, PKACT_INPUT, PKACT_NONE, PKACK_GEN_DISP},
{PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE},
- {PKACK_GEN_DISP, PKACK_GEN_DISP, PKACT_INPUT, PKACT_NONE, PKACK_GEN_DISP},
+ {PKACK_GEN_DISP, PKACK_GEN_DISP, PKACK_GEN_DISP, PKACT_NONE, PKACK_GEN_DISP},
};
/* This is the initiator passkey action action depending on the io
@@ -690,7 +690,7 @@ static const uint8_t responder_pkact[5 /*init*/ ][5 /*resp */] =
{PKACT_NONE, PKACT_NONE, PKACK_GEN_DISP, PKACT_NONE, PKACK_GEN_DISP},
{PKACT_INPUT, PKACT_INPUT, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
{PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE, PKACT_NONE},
- {PKACT_INPUT, PKACT_INPUT, PKACK_GEN_DISP, PKACT_NONE, PKACT_INPUT},
+ {PKACT_INPUT, PKACT_INPUT, PKACT_INPUT, PKACT_NONE, PKACT_INPUT},
};
static int