aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_sock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index f6c18abab797..29827c77f6ce 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -380,7 +380,10 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
380 if (haddr.hci_family != AF_BLUETOOTH) 380 if (haddr.hci_family != AF_BLUETOOTH)
381 return -EINVAL; 381 return -EINVAL;
382 382
383 if (haddr.hci_channel != HCI_CHANNEL_RAW && !enable_mgmt) 383 if (haddr.hci_channel > HCI_CHANNEL_CONTROL)
384 return -EINVAL;
385
386 if (haddr.hci_channel == HCI_CHANNEL_CONTROL && !enable_mgmt)
384 return -EINVAL; 387 return -EINVAL;
385 388
386 lock_sock(sk); 389 lock_sock(sk);