diff options
author | Arun Kumar Neelakantam <aneela@codeaurora.org> | 2018-07-04 19:49:32 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-05 20:20:03 +0900 |
commit | fdf5fd3975666804118e62c69de25dc85cc0909c (patch) | |
tree | 4a849a70c8d014520efa5373590e816a0a2b46ad /net/qrtr | |
parent | a9ba23d48dbc6ffd08426bb10f05720e0b9f5c14 (diff) | |
download | linux-fdf5fd3975666804118e62c69de25dc85cc0909c.tar.gz linux-fdf5fd3975666804118e62c69de25dc85cc0909c.tar.bz2 linux-fdf5fd3975666804118e62c69de25dc85cc0909c.zip |
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 <aneela@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/qrtr')
-rw-r--r-- | net/qrtr/qrtr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 2aa07b547b16..7ffc9a3a7dd4 100644 --- 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 { |