Skip to contentSkip to conversation

Bluetooth: Add mising hci_skb_opcode for raw socket commands

PATCH Superseded Marcel Holtmann 1 participant 1 message Nov 5, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Add mising hci_skb_opcode for raw socket commands

When HCI commands are injected via the raw socket, the core was not including the decoded opcode value. So ensure that it is actually set.

---
 net/bluetooth/hci_sock.c | 2 ++
 1 file changed, 2 insertions(+)
net/bluetooth/hci_sock.c +2 -0
index 62e68232ad62..d70c2b5f0ecd 100644
@@ -1262,6 +1262,8 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,
 			goto drop;
 		}
 
+		hci_skb_opcode(skb) = opcode;
+
 		/* Include process credentials */
 		hci_sock_creds_to_skb(skb);
 
Signature · 1 line
2.5.0