projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f81fe64
)
Bluetooth: Fix handling of getpeername() for HCI sockets
author
Marcel Holtmann
<marcel@holtmann.org>
Mon, 26 Aug 2013 07:06:30 +0000
(
00:06
-0700)
committer
Gustavo Padovan
<gustavo.padovan@collabora.co.uk>
Mon, 16 Sep 2013 17:35:54 +0000
(14:35 -0300)
The HCI sockets do not have a peer associated with it and so make sure
that getpeername() returns EOPNOTSUPP since this operation is actually
not supported on HCI sockets.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_sock.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/hci_sock.c
b/net/bluetooth/hci_sock.c
index
c45ec25
..
d858941
100644
(file)
--- a/
net/bluetooth/hci_sock.c
+++ b/
net/bluetooth/hci_sock.c
@@
-699,6
+699,9
@@
static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
BT_DBG("sock %p sk %p", sock, sk);
+ if (peer)
+ return -EOPNOTSUPP;
+
if (!hdev)
return -EBADFD;