net: qrtr: Only update pkts with broadcast node ID

Forwarding of control packets are not reaching the destination because
of replacing all control packets node id with node_id instead of
packet destination node_id.

Replace dst_node_id only when node id is broadcast node ID.

Change-Id: I544f52613fbf8b0973f3188d2acc03f5487d6bac
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
This commit is contained in:
Arun Kumar Neelakantam 2019-02-25 18:22:21 +05:30 committed by Chris Lew
parent 23199b17f7
commit 7b77a058b6

View file

@ -530,14 +530,12 @@ 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);
if (to->sq_port == QRTR_PORT_CTRL) {
if (to->sq_node == QRTR_NODE_BCAST)
hdr->dst_node_id = cpu_to_le32(node->nid);
hdr->dst_port_id = cpu_to_le32(QRTR_NODE_BCAST);
} else {
else
hdr->dst_node_id = cpu_to_le32(to->sq_node);
hdr->dst_port_id = cpu_to_le32(to->sq_port);
}
hdr->dst_port_id = cpu_to_le32(to->sq_port);
hdr->size = cpu_to_le32(len);
hdr->confirm_rx = !!confirm_rx;