rpc_binder: Set CID of vsock servers
So far all our vsock servers have been listening on VMHOST_CID_ANY. The
API now requires to provide the CID explicitly. Adjust the users.
Bug: 245727626
Test: atest -p packages/modules/Virtualization:avf-presubmit
Change-Id: I5ab7db3e1b2ef7c495d63cf7a409e8dac4318d59
diff --git a/virtualizationservice/src/aidl.rs b/virtualizationservice/src/aidl.rs
index 7d24a32..88e7ce0 100644
--- a/virtualizationservice/src/aidl.rs
+++ b/virtualizationservice/src/aidl.rs
@@ -463,9 +463,8 @@
let service = VirtualMachineService::new_binder(self.state.clone(), cid).as_binder();
// Start VM service listening for connections from the new CID on port=CID.
- // TODO(b/245727626): Only accept connections from the new VM.
let port = cid;
- match RpcServer::new_vsock(service, port) {
+ match RpcServer::new_vsock(service, cid, port) {
Ok(vm_server) => {
vm_server.start();
return Ok((VmContext::new(global_context, vm_server), cid));