Skip to content

Commit 1e7d9df

Browse files
mmhalkuba-moo
authored andcommitted
vsock: Fix IOCTL_VM_SOCKETS_GET_LOCAL_CID to check also transport_local
Support returning VMADDR_CID_LOCAL in case no other vsock transport is available. Fixes: 0e12190 ("vsock: add local transport support in the vsock core") Suggested-by: Stefano Garzarella <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: Michal Luczaj <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 687aa0c commit 1e7d9df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/vmw_vsock/af_vsock.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,6 +2581,8 @@ static long vsock_dev_do_ioctl(struct file *filp,
25812581
cid = vsock_registered_transport_cid(&transport_g2h);
25822582
if (cid == VMADDR_CID_ANY)
25832583
cid = vsock_registered_transport_cid(&transport_h2g);
2584+
if (cid == VMADDR_CID_ANY)
2585+
cid = vsock_registered_transport_cid(&transport_local);
25842586

25852587
if (put_user(cid, p) != 0)
25862588
retval = -EFAULT;

0 commit comments

Comments
 (0)