Skip to content

Commit

Permalink
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
Browse files Browse the repository at this point in the history
Remote peer is always the host, so we set VMADDR_CID_HOST as
remote CID instead of VMADDR_CID_ANY.

Reviewed-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stefano Garzarella authored and David S. Miller committed Nov 15, 2019
1 parent 55f3e14 commit 0396425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/vmw_vsock/hyperv_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,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 ? */
Expand Down

0 comments on commit 0396425

Please sign in to comment.