|
From: Anders J. <and...@us...> - 2002-02-13 14:05:07
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bnep.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20
l2cap_sec.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20
sec_client.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Check that L2CAP really have an upper connection when we got a disconnect=
_ind.
* Always send authentication_pending as a reply on a l2cap_connection_req w=
hen
using the securitymanager and BNEP.
* Handle NULL-BD adresses in the sec_client.
The diff of the modified file(s):
--- bnep.c 12 Feb 2002 13:54:00 -0000 1.6
+++ bnep.c 13 Feb 2002 14:05:03 -0000 1.7
@@ -1416,11 +1416,13 @@
/* acknowledge the disconnect */
if (l2ca_disconnect_rsp(l2cap)) {
D_ERR("ether_disconnect_ind: l2ca_disconnect_rsp failed\n");
- //return;
}
+=09
+ if(dev) {
local =3D dev->priv;
local->l2cap =3D NULL;
local->state =3D DISCONNECTED;
+ }
}
=20
static void=20
--- l2cap_sec.c 15 Feb 2001 16:27:33 -0000 1.3
+++ l2cap_sec.c 13 Feb 2002 14:05:04 -0000 1.4
@@ -115,6 +115,9 @@
/* send connection response PSM security block */
l2ca_connect_rsp(con, RES_SECNEG, STAT_NOINFO);
break;
+ case AUTHENTICATION_PENDING:
+ l2ca_connect_rsp(con, RES_PENDING, STAT_AUTHENTPEND);
+ break;
=20
case GENERAL_FAILURE:
/* send connection response PSM security block */
--- sec_client.c 10 Dec 2001 16:18:14 -0000 1.19
+++ sec_client.c 13 Feb 2002 14:05:04 -0000 1.20
@@ -171,9 +171,10 @@
s32 delete_link_key(link_key_information_type *link_key);
=20
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
+u8 null_bd_addr[BD_ADDRESS_SIZE];
=20
-/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
=20
+/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
static link_key_list_type link_key_list;
=20
#ifdef __KERNEL__
@@ -300,6 +301,7 @@
void=20
sec_man_init(enum security_requests user)
{
+ int i;
#ifndef __KERNEL__
sec_man_sock =3D open_socket(SEC_MAN_SRV_SOCK);
#endif
@@ -307,6 +309,10 @@
=20
/* To indicate that nothing is ready */
security_query.originator =3D SEC_CLIENT;=20
+=09
+ for(i =3D 0 ; i < BD_ADDRESS_SIZE ; i++) {
+ null_bd_addr[i] =3D 0;
+ }
}
=20
void
@@ -552,7 +558,12 @@
D_PROC("Called sec_man_event user:%d event:%02x\n", user, event);
security_query.request_type =3D user;
security_query.request_value =3D event;
+ if(bd_addr) {
memcpy(security_query.remote_bd, bd_addr, BD_ADDRESS_SIZE);
+ } else {
+ memcpy(security_query.remote_bd, null_bd_addr, BD_ADDRESS_SIZE);
+ }
+=09=09
security_query.originator =3D BT_SEC_MAN;
=20=09=09
if (param_len > MAX_EVENT_DATA_LENGTH) {
|