diff options
author | Arun Kumar Neelakantam <aneela@codeaurora.org> | 2018-07-04 19:49:33 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-05 20:20:03 +0900 |
commit | d27e77a3de2866b0a772803fd03cd667b5ff8a9a (patch) | |
tree | afc8b015ee789204fa1326fd3dafcf6fd900efe6 /net/qrtr | |
parent | fdf5fd3975666804118e62c69de25dc85cc0909c (diff) | |
download | op-kernel-dev-d27e77a3de2866b0a772803fd03cd667b5ff8a9a.zip op-kernel-dev-d27e77a3de2866b0a772803fd03cd667b5ff8a9a.tar.gz |
net: qrtr: Reset the node and port ID of broadcast messages
All the control messages broadcast to remote routers are using
QRTR_NODE_BCAST instead of using local router NODE ID which cause
the packets to be dropped on remote router due to invalid NODE 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 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 7ffc9a3..86e1e37 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -191,8 +191,13 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb, hdr->type = cpu_to_le32(type); hdr->src_node_id = cpu_to_le32(from->sq_node); hdr->src_port_id = cpu_to_le32(from->sq_port); - hdr->dst_node_id = cpu_to_le32(to->sq_node); - hdr->dst_port_id = cpu_to_le32(to->sq_port); + if (to->sq_port == QRTR_PORT_CTRL) { + hdr->dst_node_id = cpu_to_le32(node->nid); + hdr->dst_port_id = cpu_to_le32(QRTR_NODE_BCAST); + } else { + hdr->dst_node_id = cpu_to_le32(to->sq_node); + hdr->dst_port_id = cpu_to_le32(to->sq_port); + } hdr->size = cpu_to_le32(len); hdr->confirm_rx = 0; |