From 17d0568b432aea0da88f64c5c4b7fe45c0362c12 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 21 Feb 2021 20:29:52 -0500 Subject: [PATCH] Fixes for 4.19 Signed-off-by: Sasha Levin --- ...rtr-fix-port-id-for-control-messages.patch | 37 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 queue-4.19/net-qrtr-fix-port-id-for-control-messages.patch diff --git a/queue-4.19/net-qrtr-fix-port-id-for-control-messages.patch b/queue-4.19/net-qrtr-fix-port-id-for-control-messages.patch new file mode 100644 index 00000000000..3b2c5f54a0a --- /dev/null +++ b/queue-4.19/net-qrtr-fix-port-id-for-control-messages.patch @@ -0,0 +1,37 @@ +From 717b79a77b96e8fc8dd81f6c0181ce3dfdc46c18 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 6 Nov 2020 18:33:26 +0100 +Subject: net: qrtr: Fix port ID for control messages + +From: Loic Poulain + +[ Upstream commit ae068f561baa003d260475c3e441ca454b186726 ] + +The port ID for control messages was uncorrectly set with broadcast +node ID value, causing message to be dropped on remote side since +not passing packet filtering (cb->dst_port != QRTR_PORT_CTRL). + +Fixes: d27e77a3de28 ("net: qrtr: Reset the node and port ID of broadcast messages") +Signed-off-by: Loic Poulain +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + net/qrtr/qrtr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c +index a05c5cb3429c0..69cf9cbbb05f6 100644 +--- a/net/qrtr/qrtr.c ++++ b/net/qrtr/qrtr.c +@@ -194,7 +194,7 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb, + hdr->src_port_id = cpu_to_le32(from->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); ++ hdr->dst_port_id = cpu_to_le32(QRTR_PORT_CTRL); + } else { + hdr->dst_node_id = cpu_to_le32(to->sq_node); + hdr->dst_port_id = cpu_to_le32(to->sq_port); +-- +2.27.0 + diff --git a/queue-4.19/series b/queue-4.19/series index 137c1800cc8..294a013732d 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -36,3 +36,4 @@ net-qrtr-restrict-user-controlled-length-in-qrtr_tun_write_iter.patch ovl-expand-warning-in-ovl_d_real.patch x86-build-disable-cet-instrumentation-in-the-kernel-for-32-bit-too.patch kvm-sev-fix-double-locking-due-to-incorrect-backport.patch +net-qrtr-fix-port-id-for-control-messages.patch -- 2.47.3