[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] bug in l2cap.c line 2227



Hi,

In l2cap.c, function l2ca_connect_cfm, line 2227 we have :

if (con->psm > MAX_PSM)
  return;

So, if the test_conn command is issued (psm=0x1231), the l2cap channel
is opened but never goes thru the configuration process...
I propose replacing these lines by :

 /* Check PSM */
 if ((con->psm % 2) == 0) {
  D_ERR("l2ca_connect_cfm : incorrect PSM value\n");
  return ;
 }
 if ((con->psm > MAX_PSM) && (con->psm < MIN_DYNAMIC_PSM)) {
  D_ERR("l2ca_connect_cfm : value of PSM preserved\n");
  return ;
 }
 if (con->psm > MAX_DYNAMIC_PSM) {
  D_ERR("l2ca_connect_cfm : PSM value not valid\n");
  return ;
 }

(same as what is done in function l2ca_connect_req )

The test cases work fine.

David.


-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com