Re: [PATCH net-next v8 5/7] vsock/virtio: support guest device network namespace
From: Michal Luczaj
Date: Fri Dec 04 2026 - 14:07:17 EST
On 12/1/26 02:06, Bobby Eshleman wrote:
> bool virtio_transport_stream_allow(struct vsock_sock *vsk, u32 cid, u32 port)
> {
> - return vsock_net_mode_global(vsk);
> + return vsock_g2h_net_reachable(sock_net(sk_vsock(vsk)));
> }
> @@ -616,7 +619,7 @@ virtio_transport_seqpacket_allow(struct vsock_sock *vsk, u32 remote_cid)
> struct virtio_vsock *vsock;
> bool seqpacket_allow;
>
> - if (!vsock_net_mode_global(vsk))
> + if (!vsock_g2h_net_reachable(sock_net(sk_vsock(vsk))))
> return false;
I was comparing this with other transports and noticed
static bool vsock_loopback_stream_allow(struct vsock_sock *vsk, u32 cid,
u32 port)
{
return true;
}
static bool
vsock_loopback_seqpacket_allow(struct vsock_sock *vsk, u32 remote_cid)
{
return vsock_net_mode_global(vsk);
}
If I'm not mistaken, local-mode same-ns loopback stream is allowed, but
seqpacket is not. Just checking, was this the intention?
thanks,
Michal