diff --git a/include/bluetooth/conn.h b/include/bluetooth/conn.h index 64939582a14..983840e4420 100644 --- a/include/bluetooth/conn.h +++ b/include/bluetooth/conn.h @@ -242,7 +242,7 @@ struct bt_conn *bt_conn_create_slave_le(const bt_addr_le_t *peer, /** Security level. */ typedef enum __packed { /** Only for BR/EDR special cases, like SDP */ - BT_SECURITY_ZERO, + BT_SECURITY_NONE, /** No encryption and no authentication. */ BT_SECURITY_LOW, /** Encryption and no authentication (no MITM). */ diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 15cad55f494..b31f57f8438 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1359,7 +1359,7 @@ int bt_l2cap_chan_connect(struct bt_conn *conn, struct bt_l2cap_chan *chan, if (chan->required_sec_level > BT_SECURITY_FIPS) { return -EINVAL; - } else if (chan->required_sec_level == BT_SECURITY_ZERO) { + } else if (chan->required_sec_level == BT_SECURITY_NONE) { chan->required_sec_level = BT_SECURITY_LOW; } diff --git a/net/bluetooth/l2cap_br.c b/net/bluetooth/l2cap_br.c index 32b9fdf37a5..39a8cc6ce14 100644 --- a/net/bluetooth/l2cap_br.c +++ b/net/bluetooth/l2cap_br.c @@ -708,7 +708,7 @@ l2cap_br_conn_security(struct bt_l2cap_chan *chan, const uint16_t psm) int check; /* For SDP PSM there's no need to change existing security on link */ - if (chan->required_sec_level == BT_SECURITY_ZERO) { + if (chan->required_sec_level == BT_SECURITY_NONE) { return L2CAP_CONN_SECURITY_PASSED; } @@ -839,7 +839,7 @@ static void l2cap_br_conn_req(struct bt_l2cap_br *l2cap, uint8_t ident, * Report security violation for non SDP channel without encryption when * remote supports SSP. */ - if (server->sec_level != BT_SECURITY_ZERO && + if (server->sec_level != BT_SECURITY_NONE && BT_FEAT_HOST_SSP(conn->br.features) && !conn->encrypt) { result = BT_L2CAP_BR_ERR_SEC_BLOCK; goto done; @@ -977,7 +977,7 @@ int bt_l2cap_br_server_register(struct bt_l2cap_server *server) if (server->sec_level > BT_SECURITY_FIPS) { return -EINVAL; - } else if (server->sec_level == BT_SECURITY_ZERO && + } else if (server->sec_level == BT_SECURITY_NONE && server->psm != L2CAP_BR_PSM_SDP) { server->sec_level = BT_SECURITY_LOW; } @@ -1372,7 +1372,7 @@ int bt_l2cap_br_chan_connect(struct bt_conn *conn, struct bt_l2cap_chan *chan, if (chan->required_sec_level > BT_SECURITY_FIPS) { return -EINVAL; - } else if (chan->required_sec_level == BT_SECURITY_ZERO && + } else if (chan->required_sec_level == BT_SECURITY_NONE && psm != L2CAP_BR_PSM_SDP) { chan->required_sec_level = BT_SECURITY_LOW; }