projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9ba23d
)
net: qrtr: Broadcast messages only from control port
author
Arun Kumar Neelakantam
<aneela@codeaurora.org>
Wed, 4 Jul 2018 14:19:32 +0000
(19:49 +0530)
committer
David S. Miller
<davem@davemloft.net>
Thu, 5 Jul 2018 11:20:03 +0000
(20:20 +0900)
The broadcast node id should only be sent with the control port id.
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/qrtr/qrtr.c
patch
|
blob
|
history
diff --git
a/net/qrtr/qrtr.c
b/net/qrtr/qrtr.c
index
2aa07b5
..
7ffc9a3
100644
(file)
--- a/
net/qrtr/qrtr.c
+++ b/
net/qrtr/qrtr.c
@@
-764,6
+764,10
@@
static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
node = NULL;
if (addr->sq_node == QRTR_NODE_BCAST) {
enqueue_fn = qrtr_bcast_enqueue;
+ if (addr->sq_port != QRTR_PORT_CTRL) {
+ release_sock(sk);
+ return -ENOTCONN;
+ }
} else if (addr->sq_node == ipc->us.sq_node) {
enqueue_fn = qrtr_local_enqueue;
} else {