Comment 0 for bug 2047634

Revision history for this message
Leo Lin (0xff07) wrote :

[Impact]

In the qualification test the from the Bluetooth SIG i.e. the
Profile Testing Suite (PTS), in the L2CAP/COS/CED/BI-02-C,
packet containing the following L2CAP packets are sent:

1. A malformed L2CAP_CONNECTION_REQ packet; and
2. An L2CAP packet with unknown command.

For compliance to the L2CAP specification, BlueZ is expected to send:

1. An L2CAP_CONNECTION_RSP packet; and
2. An L2CAP_COMMAND_REJECT_RSP packet.

However, the later one is not sent.

[Fix]
Clean cherry pick from commit 37b85190ca1ed790fe230f0ba134b10a3d3d1add

(Bluetooth: L2CAP: Send reject on command corrupted request)

[Test]
After applying the patch, test it with PTS:

1. Configure the PTS: set PSM to 0x1011, so that it initiates L2CAP connection
   over PSM 0x1011, which is the default PSM for l2test, the testing tool for
   L2CAP layer provided by bluez.

2. Set device as connectable:
 $ sudo btmgmt connectable on

3. Run l2test on the device in preparation for testing:
 $ sudo l2test -d

4. Run the L2CAP/COS/CED/BI-02-C test on PTS. The test suite will initiate
   L2CAP connection automatically.

5. Verify that the test verdict on the PTS is PASS.

[Where problems could occur]
This makes L2CAP implementation more conforming to the specification.