Bluetooth: Fix updating Identity Address in L2CAP channels
When we receive a remote identity address during SMP key distribution we should ensure that any associated L2CAP channel instances get their address information correspondingly updated (so that e.g. doing getpeername on associated sockets returns the correct address). This patch adds a new L2CAP core function l2cap_conn_update_id_addr() which is used to iterate through all L2CAP channels associated with a connection and update their address information. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:

committed by
Marcel Holtmann

parent
68d6f6ded5
commit
387a33e304
@@ -991,6 +991,8 @@ static int smp_cmd_ident_addr_info(struct l2cap_conn *conn,
|
||||
bacpy(&hcon->dst, &smp->id_addr);
|
||||
hcon->dst_type = smp->id_addr_type;
|
||||
|
||||
l2cap_conn_update_id_addr(hcon);
|
||||
|
||||
smp_distribute_keys(conn, 1);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user