提交 03964257 编写于 作者: S Stefano Garzarella 提交者: David S. Miller

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: NDexuan Cui <decui@microsoft.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 55f3e149
...@@ -188,7 +188,8 @@ static void hvs_remote_addr_init(struct sockaddr_vm *remote, ...@@ -188,7 +188,8 @@ static void hvs_remote_addr_init(struct sockaddr_vm *remote,
static u32 host_ephemeral_port = MIN_HOST_EPHEMERAL_PORT; static u32 host_ephemeral_port = MIN_HOST_EPHEMERAL_PORT;
struct sock *sk; 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) { while (1) {
/* Wrap around ? */ /* Wrap around ? */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册