Loading system/gd/l2cap/classic/cert/cert_l2cap.py +6 −2 Original line number Diff line number Diff line Loading @@ -190,6 +190,10 @@ class CertL2cap(Closable): self.control_table[CommandCode.CONFIGURATION_REQUEST] = lambda _: True self.control_table[CommandCode.CONNECTION_RESPONSE] = lambda _: True # more of a hack for the moment def ignore_config_request(self): self.control_table[CommandCode.CONFIGURATION_REQUEST] = lambda _: True # more of a hack for the moment def reply_with_unacceptable_parameters(self): self.control_table[ Loading Loading @@ -416,8 +420,8 @@ class CertL2cap(Closable): return if information_type == l2cap_packets.InformationRequestInfoType.EXTENDED_FEATURES_SUPPORTED: response = l2cap_packets.InformationResponseExtendedFeaturesBuilder( sid, l2cap_packets.InformationRequestResult.SUCCESS, 0, 0, 0, self.support_ertm, 0, self.support_fcs, 0, 0, 0, 0) sid, l2cap_packets.InformationRequestResult.SUCCESS, 0, 0, 0, self.support_ertm, 0, self.support_fcs, 0, 0, 0, 0) self.control_channel.send(response) return if information_type == l2cap_packets.InformationRequestInfoType.FIXED_CHANNELS_SUPPORTED: Loading system/gd/l2cap/classic/cert/l2cap_test.py +14 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,20 @@ class L2capTest(GdBaseTestClass): L2capMatchers.ConfigurationRequest(), L2capMatchers.ConfigurationRequest()).inAnyOrder() def test_non_blocking_config_response(self): """ L2CAP/COS/CFD/BV-08-C """ self._setup_link_from_cert() self.cert_l2cap.ignore_config_request() self._open_unvalidated_channel(scid=0x41, psm=0x33) assertThat(self.cert_l2cap.get_control_channel()).emits( L2capMatchers.ConfigurationResponse(), L2capMatchers.ConfigurationRequest()).inAnyOrder() def test_config_unknown_options_with_hint(self): """ L2CAP/COS/CFD/BV-12-C Loading Loading
system/gd/l2cap/classic/cert/cert_l2cap.py +6 −2 Original line number Diff line number Diff line Loading @@ -190,6 +190,10 @@ class CertL2cap(Closable): self.control_table[CommandCode.CONFIGURATION_REQUEST] = lambda _: True self.control_table[CommandCode.CONNECTION_RESPONSE] = lambda _: True # more of a hack for the moment def ignore_config_request(self): self.control_table[CommandCode.CONFIGURATION_REQUEST] = lambda _: True # more of a hack for the moment def reply_with_unacceptable_parameters(self): self.control_table[ Loading Loading @@ -416,8 +420,8 @@ class CertL2cap(Closable): return if information_type == l2cap_packets.InformationRequestInfoType.EXTENDED_FEATURES_SUPPORTED: response = l2cap_packets.InformationResponseExtendedFeaturesBuilder( sid, l2cap_packets.InformationRequestResult.SUCCESS, 0, 0, 0, self.support_ertm, 0, self.support_fcs, 0, 0, 0, 0) sid, l2cap_packets.InformationRequestResult.SUCCESS, 0, 0, 0, self.support_ertm, 0, self.support_fcs, 0, 0, 0, 0) self.control_channel.send(response) return if information_type == l2cap_packets.InformationRequestInfoType.FIXED_CHANNELS_SUPPORTED: Loading
system/gd/l2cap/classic/cert/l2cap_test.py +14 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,20 @@ class L2capTest(GdBaseTestClass): L2capMatchers.ConfigurationRequest(), L2capMatchers.ConfigurationRequest()).inAnyOrder() def test_non_blocking_config_response(self): """ L2CAP/COS/CFD/BV-08-C """ self._setup_link_from_cert() self.cert_l2cap.ignore_config_request() self._open_unvalidated_channel(scid=0x41, psm=0x33) assertThat(self.cert_l2cap.get_control_channel()).emits( L2capMatchers.ConfigurationResponse(), L2capMatchers.ConfigurationRequest()).inAnyOrder() def test_config_unknown_options_with_hint(self): """ L2CAP/COS/CFD/BV-12-C Loading