Bluetooth: Fix handling of BNEP setup connection requests
authorVikram Kandukuri <vkandukuri@atheros.com>
Thu, 3 Dec 2009 09:42:51 +0000 (15:12 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Dec 2009 18:34:21 +0000 (19:34 +0100)
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>
net/bluetooth/bnep/core.c

index cafe9f54d8413dc181315f4d7d4792144bfe4417..29b1b220d6cff47a44ff889845ae558faaf82fab 100644 (file)
@@ -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:
@@ -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;