Skip to content

Commit 0396425

Browse files
stefano-garzarelladavem330
authored andcommitted
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
Remote peer is always the host, so we set VMADDR_CID_HOST as remote CID instead of VMADDR_CID_ANY. Reviewed-by: Dexuan Cui <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Stefano Garzarella <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 55f3e14 commit 0396425

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/vmw_vsock/hyperv_transport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ static void hvs_remote_addr_init(struct sockaddr_vm *remote,
188188
static u32 host_ephemeral_port = MIN_HOST_EPHEMERAL_PORT;
189189
struct sock *sk;
190190

191-
vsock_addr_init(remote, VMADDR_CID_ANY, VMADDR_PORT_ANY);
191+
/* Remote peer is always the host */
192+
vsock_addr_init(remote, VMADDR_CID_HOST, VMADDR_PORT_ANY);
192193

193194
while (1) {
194195
/* Wrap around ? */

0 commit comments

Comments
 (0)