From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E8FACA9EB6 for ; Wed, 23 Oct 2019 09:58:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21B432064A for ; Wed, 23 Oct 2019 09:58:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DPLNSqOF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404225AbfJWJ6S (ORCPT ); Wed, 23 Oct 2019 05:58:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31975 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404202AbfJWJ6M (ORCPT ); Wed, 23 Oct 2019 05:58:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571824692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QqZmsfhJMgpWrzF5n+cfQZ/T/oXxyaU+Am+8Hcv5VFQ=; b=DPLNSqOFfRApWeMx8beiNAYyqWemO3A7oGFKSnQ0AEInUNxZddRBxfLA6413rnb02IT6Vo JwMZWmUiVCrU4E+gLvEQGXxzzITUCa4+Rfi0VY2x4UGKi/jAhCzlEXAsIAuE1MxlFMPO0G oF/xSbSxqAAilT4rLcPNiD0Ok6k8w/I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-13-cVbbATTHN12aGfLo4s-bgw-1; Wed, 23 Oct 2019 05:58:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 42A38476; Wed, 23 Oct 2019 09:58:06 +0000 (UTC) Received: from steredhat.redhat.com (unknown [10.36.118.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7347B5C1B2; Wed, 23 Oct 2019 09:58:00 +0000 (UTC) From: Stefano Garzarella To: netdev@vger.kernel.org Cc: "Michael S. Tsirkin" , kvm@vger.kernel.org, Greg Kroah-Hartman , Jason Wang , "David S. Miller" , Dexuan Cui , Haiyang Zhang , Jorgen Hansen , Sasha Levin , linux-kernel@vger.kernel.org, Arnd Bergmann , Stefan Hajnoczi , linux-hyperv@vger.kernel.org, "K. Y. Srinivasan" , Stephen Hemminger , virtualization@lists.linux-foundation.org Subject: [PATCH net-next 10/14] hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init() Date: Wed, 23 Oct 2019 11:55:50 +0200 Message-Id: <20191023095554.11340-11-sgarzare@redhat.com> In-Reply-To: <20191023095554.11340-1-sgarzare@redhat.com> References: <20191023095554.11340-1-sgarzare@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: cVbbATTHN12aGfLo4s-bgw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable 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. Reviewed-by: Dexuan Cui Reviewed-by: Stefan Hajnoczi 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_transp= ort.c index 0ce792a1bf6c..fc7e61765a4a 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -188,7 +188,8 @@ static void hvs_remote_addr_init(struct sockaddr_vm *re= mote, =09static u32 host_ephemeral_port =3D MIN_HOST_EPHEMERAL_PORT; =09struct sock *sk; =20 -=09vsock_addr_init(remote, VMADDR_CID_ANY, VMADDR_PORT_ANY); +=09/* Remote peer is always the host */ +=09vsock_addr_init(remote, VMADDR_CID_HOST, VMADDR_PORT_ANY); =20 =09while (1) { =09=09/* Wrap around ? */ --=20 2.21.0