From: Bobby Eshleman <bobbyeshle...@meta.com>

Add NS support to vsock loopback. In theory, loopback can be viewed as
a given CID, and so should collide with other vsocks when the namespaces
are in global mode, but should not collide if the namespace is in local
mode. This has not been tested yet, but will be by the next rev.

TODO: add tests for this

Signed-off-by: Bobby Eshleman <bobbyeshle...@meta.com>
---
 net/vmw_vsock/vsock_loopback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index 6e78927a598e..1b2fab73e0d0 100644
--- a/net/vmw_vsock/vsock_loopback.c
+++ b/net/vmw_vsock/vsock_loopback.c
@@ -46,7 +46,7 @@ static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk)
        return 0;
 }
 
-static bool vsock_loopback_seqpacket_allow(u32 remote_cid);
+static bool vsock_loopback_seqpacket_allow(struct vsock_sock *vsk, u32 
remote_cid);
 static bool vsock_loopback_msgzerocopy_allow(void)
 {
        return true;
@@ -106,7 +106,7 @@ static struct virtio_transport loopback_transport = {
        .send_pkt = vsock_loopback_send_pkt,
 };
 
-static bool vsock_loopback_seqpacket_allow(u32 remote_cid)
+static bool vsock_loopback_seqpacket_allow(struct vsock_sock *vsk, u32 
remote_cid)
 {
        return true;
 }

-- 
2.47.1


Reply via email to