Skip to content

Commit

Permalink
net: qrtr: Reset the node and port ID of broadcast messages
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Arun Kumar Neelakantam authored and davem330 committed Jul 5, 2018
1 parent fdf5fd3 commit d27e77a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions net/qrtr/qrtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d27e77a

Please sign in to comment.