Skip to content

Commit

Permalink
Bluetooth: Fix handling of BNEP setup connection requests
Browse files Browse the repository at this point in the history
According to BNEP test specification the proper response should be sent
for a setup connection request message after the BNEP connection setup
has been completed.

Signed-off-by: Vikram Kandukuri <vikram.kandukuri@atheros.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Vikram Kandukuri authored and Marcel Holtmann committed Dec 3, 2009
1 parent c78ae28 commit cde9f80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ static int bnep_rx_control(struct bnep_session *s, void *data, int len)

switch (cmd) {
case BNEP_CMD_NOT_UNDERSTOOD:
case BNEP_SETUP_CONN_REQ:
case BNEP_SETUP_CONN_RSP:
case BNEP_FILTER_NET_TYPE_RSP:
case BNEP_FILTER_MULTI_ADDR_RSP:
Expand All @@ -245,6 +244,10 @@ static int bnep_rx_control(struct bnep_session *s, void *data, int len)
err = bnep_ctrl_set_mcfilter(s, data, len);
break;

case BNEP_SETUP_CONN_REQ:
err = bnep_send_rsp(s, BNEP_SETUP_CONN_RSP, BNEP_CONN_NOT_ALLOWED);
break;

default: {
u8 pkt[3];
pkt[0] = BNEP_CONTROL;
Expand Down

0 comments on commit cde9f80

Please sign in to comment.