Skip to content
Commit e8b1ab9e authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann
Browse files

Bluetooth: Fix returning peer address in pending connect state



We should let user space request the peer address also in the pending
connect states, i.e. BT_CONNECT and BT_CONNECT2. There is existing user
space code that tries to do this and will fail without extending the set
of allowed states for the peer address information.

This patch adds the two states to the allowed ones in the L2CAP and
RFCOMM sock_getname functions, thereby preventing ENOTCONN from being
returned.

Reported-by: default avatarAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Tested-by: default avatarAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 8396215d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment