diff --git a/fs/vfs_ops.c b/fs/vfs_ops.c index 8eb6f64..3d33f62 100644 --- a/fs/vfs_ops.c +++ b/fs/vfs_ops.c @@ -185,6 +185,10 @@ int vfs_open_vnode(struct vfs_ioctx *ctx, struct ofile *fd, struct vnode *node, _assert(node); fd->flags &= ~OF_SOCKET; + if (node->type == VN_SOCK) { + return -ENODEV; + } + if (opt & O_DIRECTORY) { if (node->type != VN_DIR) { return -ENOTDIR;