Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3306571ybn; Fri, 27 Sep 2019 04:29:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZdEekvJciIdTZrkwot855XtO2/R8MAeK8/TDP1gDIghj6eDfD4tVgCqWki9u3f/eepbsQ X-Received: by 2002:a50:fa83:: with SMTP id w3mr3835858edr.262.1569583779493; Fri, 27 Sep 2019 04:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569583779; cv=none; d=google.com; s=arc-20160816; b=duA9Ks8qedj6ick5gpUl5xXFGbWCPUF3mDhqpRK7lPqMm4wcC+wC7DBC8PLYUb+bF4 MFJ9b731EpAcuaowBdUkNz3fcW6I6Np+SJWeQ8iivhXyfjx9X8HbEYJh1ec1y6+p86ty xx5+mzttOnhfG5rRuou3iD4PZ3O/yZc7V+uVe4QJY1LTQSciSjP6yKZUev5cWaNY18yB hl+ugBDrZXJUA1DPyjB01YOpak1ZZVTgUfCi9xcXa1BNr0O0zvOLSOqBkbPbkNCgA3fl cZ9TsUkAq3NbyaR0e56eUfT3BJgAUlnYHDGfhD2CaapaSc10jXWmAYhetJ3ySN0muogg 6wGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0KKUjGWy8R+tU/elzKOW+Qf/6zvXDaIz4bqwaqcqpzo=; b=txbpP/BSMceJzJUYA3cW7pWzl+Obi77eWf5fibuIQjCKtAUgtWj7R9PcaKmNQEg5NO A7DKVyWV8+mPRmcptzELhAISgZoDHYtT5S09afFs5/mBPrB8Dk5OzdotgawzTJXGULfI 40hxedm0HRmg6TTe9HVZsX5j3RAmMFY04T1biEdXmUmV2HsRNtTH0Bh3bfDm7Uz3nDGV suPx70VRUnESnO3IE540FAhn4Dhow/nSeWf71YhEayNZYKGa4L2YOiHw5LmD4wWwP1Mp ADMHf7tBDsPSuLfYYTZOhDD68odcRQGMXwZ1/mXL31ilRFpW2tn5aSnp3cmt794gYwTJ rl/Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a26si1342315edv.35.2019.09.27.04.29.15; Fri, 27 Sep 2019 04:29:39 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbfI0L2Z (ORCPT + 99 others); Fri, 27 Sep 2019 07:28:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36532 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727674AbfI0L2X (ORCPT ); Fri, 27 Sep 2019 07:28:23 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56D743060399; Fri, 27 Sep 2019 11:28:23 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-117-249.ams2.redhat.com [10.36.117.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id 536095D9C3; Fri, 27 Sep 2019 11:28:20 +0000 (UTC) From: Stefano Garzarella To: netdev@vger.kernel.org Cc: linux-hyperv@vger.kernel.org, "K. Y. Srinivasan" , Stefan Hajnoczi , Sasha Levin , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "David S. Miller" , virtualization@lists.linux-foundation.org, Stephen Hemminger , Jason Wang , "Michael S. Tsirkin" , Haiyang Zhang , Dexuan Cui , Jorgen Hansen Subject: [RFC PATCH 09/13] hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init() Date: Fri, 27 Sep 2019 13:26:59 +0200 Message-Id: <20190927112703.17745-10-sgarzare@redhat.com> In-Reply-To: <20190927112703.17745-1-sgarzare@redhat.com> References: <20190927112703.17745-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 27 Sep 2019 11:28:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remote peer is always the host, so we set VMADDR_CID_HOST as remote CID instead of VMADDR_CID_ANY. Signed-off-by: Stefano Garzarella --- net/vmw_vsock/hyperv_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index 4f47af2054dd..306310794522 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -186,7 +186,8 @@ static void hvs_remote_addr_init(struct sockaddr_vm *remote, static u32 host_ephemeral_port = MIN_HOST_EPHEMERAL_PORT; struct sock *sk; - vsock_addr_init(remote, VMADDR_CID_ANY, VMADDR_PORT_ANY); + /* Remote peer is always the host */ + vsock_addr_init(remote, VMADDR_CID_HOST, VMADDR_PORT_ANY); while (1) { /* Wrap around ? */ -- 2.21.0