Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp868213imm; Wed, 4 Jul 2018 07:21:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdvBlMrckXLqKkcu84DaPU9CHWi/RO6QnS9QOfZvykAHgqKJ5uGpF73PMvHS6Ff78GR/8Kc X-Received: by 2002:a63:1546:: with SMTP id 6-v6mr2125552pgv.271.1530714091719; Wed, 04 Jul 2018 07:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530714091; cv=none; d=google.com; s=arc-20160816; b=RGmzQCFqn8eIdiqq+cvI4xQGDnmqe62D5i2rbCjv1IWjs1v63wBu38ERXxLxDuFvDc 2NmjN21pynI5cThru1HqFcWaJuWxFAiZTQ2m0RIuWY12Jikp5LdfZM4IxOnJcnJvqN3D uPLgDxxXGjrSZfsy8fpM7SZLSeLe58EeBA4cst+iGgasQjitbrcOOT3unzLCy0SHGltH CKidDcpoVgdDIJE62QNQLN4ueT0fu/fqVky8+8QPr1itKH/tzdzZWUwl+Y85dkXNe6i2 UjyDWIeLF+MH5CstiY2Z489WavbThowPgFt3k2jvS3XyW6pKPVJScjhpU99q/T5kwVcg k/gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=ExKFeLxX1PSOZw1MCuunCOFkKx9r8UdDmVQriy8ic0w=; b=h6KMe0eeTmBl9AkDcNqdCVYJukYF5oT3XP7KtgFC0rIQ6rja0+DW0z0J4KO2zdeBZp eX9qd0CeA3GKV6+E56u2DPGBi0sudJiXK9AWp3Gkcgz+UdXWuVyBnMgS4VLc2i1Ru+0X /HQHUFqYc+v7bT0iHM/3ii/15z5yysDBLCU49wi0uhsPu+TO01XlbudXslWoTH+AJ5R0 rVKAmAuAmRlhU+GGVXXzwpAhCtgkjCHTHaM9Lcau0Tf9s4URjl95Y0E/fNxln0RAU9dh xoQoblDxqX02uP34mTnd5PcKkTjzXQZSlaRmvTCrvBaTYs2HKGXHZXbqm9YNj7QAuEdV fj5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaADQ5Zr; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaADQ5Zr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190-v6si3287716pfu.343.2018.07.04.07.21.16; Wed, 04 Jul 2018 07:21:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaADQ5Zr; dkim=pass header.i=@codeaurora.org header.s=default header.b=OaADQ5Zr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbeGDOUY (ORCPT + 99 others); Wed, 4 Jul 2018 10:20:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58668 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbeGDOUW (ORCPT ); Wed, 4 Jul 2018 10:20:22 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E80F260B67; Wed, 4 Jul 2018 14:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530714021; bh=rJOnCCkkQ7MNAgqRKZ1loRLMtFHptSn0pOKqW5Jg0d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OaADQ5ZrqI6PBgLmyoLTfvCtXFNQwUjhYgyuO4dvwCvWMVVp5+swIqviJaxrQhWvp E+mYW/1e4nz0QnVfIeZ+MZM9ERu9fMTGsIr7RqxFVpbD9P78Nfcigk4pkivqluJCN1 QbZ9sHYZr/9D3xLE2KRbWaNbPG0XhpgyavPyTZMk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from aneelaka-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aneela@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C51F5607EB; Wed, 4 Jul 2018 14:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530714021; bh=rJOnCCkkQ7MNAgqRKZ1loRLMtFHptSn0pOKqW5Jg0d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OaADQ5ZrqI6PBgLmyoLTfvCtXFNQwUjhYgyuO4dvwCvWMVVp5+swIqviJaxrQhWvp E+mYW/1e4nz0QnVfIeZ+MZM9ERu9fMTGsIr7RqxFVpbD9P78Nfcigk4pkivqluJCN1 QbZ9sHYZr/9D3xLE2KRbWaNbPG0XhpgyavPyTZMk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C51F5607EB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=aneela@codeaurora.org From: Arun Kumar Neelakantam To: davem@davemloft.net, bjorn.andersson@linaro.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Arun Kumar Neelakantam , Florian Westphal , Nicolas Dechesne , Denys Vlasenko Subject: [PATCH 1/2] net: qrtr: Broadcast messages only from control port Date: Wed, 4 Jul 2018 19:49:32 +0530 Message-Id: <1530713973-26696-2-git-send-email-aneela@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530713973-26696-1-git-send-email-aneela@codeaurora.org> References: <1530713973-26696-1-git-send-email-aneela@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The broadcast node id should only be sent with the control port id. Signed-off-by: Arun Kumar Neelakantam --- net/qrtr/qrtr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 2aa07b5..7ffc9a3 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -764,6 +764,10 @@ static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) node = NULL; if (addr->sq_node == QRTR_NODE_BCAST) { enqueue_fn = qrtr_bcast_enqueue; + if (addr->sq_port != QRTR_PORT_CTRL) { + release_sock(sk); + return -ENOTCONN; + } } else if (addr->sq_node == ipc->us.sq_node) { enqueue_fn = qrtr_local_enqueue; } else { -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project