Skip to content

Commit fdf5fd3

Browse files
Arun Kumar Neelakantamdavem330
Arun Kumar Neelakantam
authored andcommitted
net: qrtr: Broadcast messages only from control port
The broadcast node id should only be sent with the control port id. Signed-off-by: Arun Kumar Neelakantam <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a9ba23d commit fdf5fd3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/qrtr/qrtr.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,10 @@ static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
764764
node = NULL;
765765
if (addr->sq_node == QRTR_NODE_BCAST) {
766766
enqueue_fn = qrtr_bcast_enqueue;
767+
if (addr->sq_port != QRTR_PORT_CTRL) {
768+
release_sock(sk);
769+
return -ENOTCONN;
770+
}
767771
} else if (addr->sq_node == ipc->us.sq_node) {
768772
enqueue_fn = qrtr_local_enqueue;
769773
} else {

0 commit comments

Comments
 (0)