|
From: Mattias ?g. <mat...@us...> - 2001-02-26 16:11:22
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
rfcomm_sec.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Fixed bug when using security and connecting as client.
Added validity check so we don't register on control channel (dlci 0)
The diff of the modified file(s):
--- rfcomm_sec.c 2001/02/15 18:01:29 1.6
+++ rfcomm_sec.c 2001/02/26 16:12:17 1.7
@@ -109,13 +109,12 @@
case SECURITY_OK:=20
{
rfcon->dlci[tmp_dlci].state =3D CONNECTED;
-#ifdef __KERNEL__
- bt_register_rfcomm(rfcon, tmp_dlci);
- bt_connect_cfm(CREATE_RFCOMM_ID(rfcon->line, tmp_dlci), 0 /* status ok*/=
);
=20
-#endif
-/* D_REC(FNC"sending back UA - other channel\n"); */
+ if (valid_dlci(tmp_dlci))
+ {
=20
+ bt_register_rfcomm(rfcon, tmp_dlci);
+ bt_connect_cfm(CREATE_RFCOMM_ID(rfcon->line, tmp_dlci), 0 /* status ok*=
/ );=09=09=09
#if 0
/* This part was taken from rfcomm.c and should perhaps
reside there */
@@ -134,7 +133,11 @@
#endif
=20
rfcomm_ua_msg(rfcon, tmp_dlci);
-=09=09
+ }
+ else
+ {
+ printk("rfcomm_process_sec_man_response : invalid dlci [%d]\n", tmp_dlc=
i);
+ }
break;
}
case UNKNOWN_REQUEST_TYPE:
|