提交 742e519b 编写于 作者: G Gustavo F. Padovan 提交者: Marcel Holtmann

Bluetooth: Disconnect the channel if we don't want the proposed mode

If the device is a STATE 2 then it should disconnect the channel if the
remote device propose a mode different from its mandatory mode.
Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 85eb53c6
......@@ -2617,8 +2617,9 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
break;
}
if (!l2cap_mode_supported(pi->mode, pi->conn->feat_mask))
if (pi->mode != rfc.mode)
return -ECONNREFUSED;
break;
default:
pi->mode = l2cap_select_mode(rfc.mode, pi->conn->feat_mask);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册