From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Kumar Neelakantam Subject: [PATCH 2/2] net: qrtr: Reset the node and port ID of broadcast messages Date: Wed, 4 Jul 2018 19:49:33 +0530 Message-ID: <1530713973-26696-3-git-send-email-aneela@codeaurora.org> References: <1530713973-26696-1-git-send-email-aneela@codeaurora.org> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Arun Kumar Neelakantam , Florian Westphal , Hannes Frederic Sowa , Denys Vlasenko , Nicolas Dechesne To: davem@davemloft.net, bjorn.andersson@linaro.org Return-path: In-Reply-To: <1530713973-26696-1-git-send-email-aneela@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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 --- net/qrtr/qrtr.c | 9 +++++++-- 1 file 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; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project